]> nmode's Git Repositories - signal-cli/blobdiff - client/src/cli.rs
Add support for sending view once messages
[signal-cli] / client / src / cli.rs
index 33403890821716278606cb66ed1087e39777b9dd..7fa5d1c5987aae15d62f9df66b27eb714d052411 100644 (file)
@@ -15,6 +15,7 @@ pub struct Cli {
     pub json_rpc_tcp: Option<Option<SocketAddr>>,
 
     /// UNIX socket address and port of signal-cli daemon
+    #[cfg(unix)]
     #[arg(long, conflicts_with = "json_rpc_tcp")]
     pub json_rpc_socket: Option<Option<OsString>>,
 
@@ -84,6 +85,8 @@ pub enum CliCommands {
     },
     GetUserStatus {
         recipient: Vec<String>,
+        #[arg(long)]
+        username: Vec<String>,
     },
     JoinGroup {
         #[arg(long)]
@@ -176,6 +179,9 @@ pub enum CliCommands {
         #[arg(short = 'a', long)]
         attachment: Vec<String>,
 
+        #[arg(long)]
+        view_once: bool,
+
         #[arg(long)]
         mention: Vec<String>,
 
@@ -277,6 +283,14 @@ pub enum CliCommands {
         #[arg(short = 's', long)]
         stop: bool,
     },
+    SendMessageRequestResponse {
+        recipient: Vec<String>,
+
+        #[arg(short = 'g', long = "group-id")]
+        group_id: Vec<String>,
+
+        r#type: MessageRequestResponseType,
+    },
     SetPin {
         pin: String,
     },
@@ -316,6 +330,10 @@ pub enum CliCommands {
         device_name: Option<String>,
         #[arg(long = "unrestricted-unidentified-sender")]
         unrestricted_unidentified_sender: Option<bool>,
+        #[arg(long = "discoverable-by-number")]
+        discoverable_by_number: Option<bool>,
+        #[arg(long = "number-sharing")]
+        number_sharing: Option<bool>,
     },
     UpdateConfiguration {
         #[arg(long = "read-receipts")]
@@ -401,7 +419,7 @@ pub enum CliCommands {
         #[arg(long = "about-emoji")]
         about_emoji: Option<String>,
 
-        #[arg(long = "mobile-coin-address")]
+        #[arg(long = "mobile-coin-address", visible_alias = "mobilecoin-address")]
         mobile_coin_address: Option<String>,
 
         #[arg(long)]
@@ -443,3 +461,10 @@ pub enum GroupPermission {
     EveryMember,
     OnlyAdmins,
 }
+
+#[derive(ValueEnum, Clone, Debug)]
+#[value(rename_all = "kebab-case")]
+pub enum MessageRequestResponseType {
+    Accept,
+    Delete,
+}