]> nmode's Git Repositories - signal-cli/blobdiff - client/src/main.rs
Implement replying to stories
[signal-cli] / client / src / main.rs
index 1ad8dbcfffffafbe21cdec9badac240f0ec5783c..ea9cb9c83c1087a6b8d0553d945f9c9acefec87a 100644 (file)
@@ -1,4 +1,4 @@
-use clap::StructOpt;
+use clap::Parser;
 use jsonrpc_client_transports::{RpcError, TypedSubscriptionStream};
 use jsonrpc_core::{futures_util::StreamExt, Value};
 use std::{path::PathBuf, time::Duration};
@@ -41,6 +41,11 @@ async fn main() -> Result<(), anyhow::Error> {
             recipient,
             group_id,
         } => client.block(cli.account, recipient, group_id).await,
+        cli::CliCommands::DeleteLocalAccountData { ignore_registered } => {
+            client
+                .delete_local_account_data(cli.account, ignore_registered)
+                .await
+        }
         cli::CliCommands::GetUserStatus { recipient } => {
             client.get_user_status(cli.account, recipient).await
         }
@@ -55,9 +60,21 @@ async fn main() -> Result<(), anyhow::Error> {
             client.finish_link(url, name).await
         }
         cli::CliCommands::ListAccounts => client.list_accounts().await,
-        cli::CliCommands::ListContacts => client.list_contacts(cli.account).await,
+        cli::CliCommands::ListContacts {
+            recipient,
+            all_recipients,
+            blocked,
+            name,
+        } => {
+            client
+                .list_contacts(cli.account, recipient, all_recipients, blocked, name)
+                .await
+        }
         cli::CliCommands::ListDevices => client.list_devices(cli.account).await,
-        cli::CliCommands::ListGroups { detailed: _ } => client.list_groups(cli.account).await,
+        cli::CliCommands::ListGroups {
+            detailed: _,
+            group_id,
+        } => client.list_groups(cli.account, group_id).await,
         cli::CliCommands::ListIdentities { number } => {
             client.list_identities(cli.account, number).await
         }
@@ -110,6 +127,8 @@ async fn main() -> Result<(), anyhow::Error> {
             quote_message,
             quote_mention,
             sticker,
+            story_timestamp,
+            story_author,
         } => {
             client
                 .send(
@@ -126,10 +145,21 @@ async fn main() -> Result<(), anyhow::Error> {
                     quote_message,
                     quote_mention,
                     sticker,
+                    story_timestamp,
+                    story_author,
                 )
                 .await
         }
         cli::CliCommands::SendContacts => client.send_contacts(cli.account).await,
+        cli::CliCommands::SendPaymentNotification {
+            recipient,
+            receipt,
+            note,
+        } => {
+            client
+                .send_payment_notification(cli.account, recipient, receipt, note)
+                .await
+        }
         cli::CliCommands::SendReaction {
             recipient,
             group_id,
@@ -138,6 +168,7 @@ async fn main() -> Result<(), anyhow::Error> {
             target_author,
             target_timestamp,
             remove,
+            story,
         } => {
             client
                 .send_reaction(
@@ -149,6 +180,7 @@ async fn main() -> Result<(), anyhow::Error> {
                     target_author,
                     target_timestamp,
                     remove,
+                    story,
                 )
                 .await
         }
@@ -243,6 +275,8 @@ async fn main() -> Result<(), anyhow::Error> {
             remove_member,
             admin,
             remove_admin,
+            ban,
+            unban,
             reset_link,
             link,
             set_permission_add_member,
@@ -261,6 +295,8 @@ async fn main() -> Result<(), anyhow::Error> {
                     remove_member,
                     admin,
                     remove_admin,
+                    ban,
+                    unban,
                     reset_link,
                     link.map(|link| match link {
                         LinkState::Enabled => "enabled".to_owned(),
@@ -288,6 +324,7 @@ async fn main() -> Result<(), anyhow::Error> {
             family_name,
             about,
             about_emoji,
+            mobile_coin_address,
             avatar,
             remove_avatar,
         } => {
@@ -298,6 +335,7 @@ async fn main() -> Result<(), anyhow::Error> {
                     family_name,
                     about,
                     about_emoji,
+                    mobile_coin_address,
                     avatar,
                     remove_avatar,
                 )