X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/7cf3a989bf47dd81f8700dcfb6986ac81e1bf02e..3d4070a13907152b312c863a2ea885ac57935365:/client/src/jsonrpc.rs diff --git a/client/src/jsonrpc.rs b/client/src/jsonrpc.rs index 211eaad8..6874652d 100644 --- a/client/src/jsonrpc.rs +++ b/client/src/jsonrpc.rs @@ -70,6 +70,7 @@ pub trait Rpc { &self, account: Option, recipients: Vec, + usernames: Vec, ) -> Result; #[method(name = "joinGroup", param_kind = map)] @@ -247,6 +248,15 @@ pub trait Rpc { stop: bool, ) -> Result; + #[method(name = "sendMessageRequestResponse", param_kind = map)] + fn send_message_request_response( + &self, + account: Option, + recipients: Vec, + #[allow(non_snake_case)] groupIds: Vec, + r#type: String, + ) -> Result; + #[method(name = "setPin", param_kind = map)] fn set_pin(&self, account: Option, pin: String) -> Result; @@ -301,6 +311,8 @@ pub trait Rpc { account: Option, deviceName: Option, unrestrictedUnidentifiedSender: Option, + discoverableByNumber: Option, + numberSharing: Option, ) -> Result; #[method(name = "updateConfiguration", param_kind = map)] @@ -398,6 +410,7 @@ pub async fn connect_tcp( Ok(ClientBuilder::default().build_with_tokio(sender, receiver)) } +#[cfg(unix)] pub async fn connect_unix( socket_path: impl AsRef, ) -> Result { @@ -406,6 +419,6 @@ pub async fn connect_unix( Ok(ClientBuilder::default().build_with_tokio(sender, receiver)) } -pub async fn connect_http(uri: &str) -> Result { +pub async fn connect_http(uri: &str) -> Result, Error> { HttpClientBuilder::default().build(uri) }