diff --git a/presage/Cargo.toml b/presage/Cargo.toml index 85a8f314c..0f69c14cb 100644 --- a/presage/Cargo.toml +++ b/presage/Cargo.toml @@ -7,8 +7,8 @@ edition = "2021" license = "AGPL-3.0-only" [dependencies] -libsignal-service = { git = "https://github.com/whisperfish/libsignal-service-rs", rev = "1b591540b908112816be131d6baa6eafba2129cb" } -libsignal-service-hyper = { git = "https://github.com/whisperfish/libsignal-service-rs", rev = "1b591540b908112816be131d6baa6eafba2129cb" } +libsignal-service = { git = "https://github.com/whisperfish/libsignal-service-rs", rev = "86dd9da99b254c2127fb60c366df426d60318097" } +libsignal-service-hyper = { git = "https://github.com/whisperfish/libsignal-service-rs", rev = "86dd9da99b254c2127fb60c366df426d60318097" } base64 = "0.21" futures = "0.3" diff --git a/presage/src/errors.rs b/presage/src/errors.rs index d2d9ef813..6cb977166 100644 --- a/presage/src/errors.rs +++ b/presage/src/errors.rs @@ -1,5 +1,6 @@ use std::borrow::Cow; +use libsignal_service::prelude::MessageSenderError; use libsignal_service::{ models::ParseContactError, protocol::SignalProtocolError, ParseServiceAddressError, }; @@ -31,7 +32,7 @@ pub enum Error { #[error("libsignal-service error: {0}")] ProfileManagerError(#[from] libsignal_service::ProfileManagerError), #[error("libsignal-service sending error: {0}")] - MessageSenderError(#[from] libsignal_service::prelude::MessageSenderError), + MessageSenderError(Box), #[error("this client is already registered with Signal")] AlreadyRegisteredError, #[error("this client is not yet registered, please register or link as a secondary device")] @@ -76,6 +77,12 @@ pub enum Error { NotPrimaryDevice, } +impl From for Error { + fn from(v: MessageSenderError) -> Self { + Self::MessageSenderError(Box::new(v)) + } +} + impl From for Error { fn from(e: S) -> Self { Self::Store(e)