mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-28 18:10:38 +00:00
Add parameter to configure phone number privacy
This commit is contained in:
parent
25258db55d
commit
6cd57312a1
11 changed files with 60 additions and 8 deletions
|
@ -316,6 +316,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")]
|
||||
|
|
|
@ -301,6 +301,8 @@ pub trait Rpc {
|
|||
account: Option<String>,
|
||||
deviceName: Option<String>,
|
||||
unrestrictedUnidentifiedSender: Option<bool>,
|
||||
discoverableByNumber: Option<bool>,
|
||||
numberSharing: Option<bool>,
|
||||
) -> Result<Value, ErrorObjectOwned>;
|
||||
|
||||
#[method(name = "updateConfiguration", param_kind = map)]
|
||||
|
|
|
@ -275,9 +275,17 @@ async fn handle_command(
|
|||
CliCommands::UpdateAccount {
|
||||
device_name,
|
||||
unrestricted_unidentified_sender,
|
||||
discoverable_by_number,
|
||||
number_sharing,
|
||||
} => {
|
||||
client
|
||||
.update_account(cli.account, device_name, unrestricted_unidentified_sender)
|
||||
.update_account(
|
||||
cli.account,
|
||||
device_name,
|
||||
unrestricted_unidentified_sender,
|
||||
discoverable_by_number,
|
||||
number_sharing,
|
||||
)
|
||||
.await
|
||||
}
|
||||
CliCommands::UpdateConfiguration {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue