Add parameter to configure phone number privacy

This commit is contained in:
AsamK 2024-02-18 19:24:23 +01:00
parent 25258db55d
commit 6cd57312a1
11 changed files with 60 additions and 8 deletions

View file

@ -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")]

View file

@ -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)]

View file

@ -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 {