From e70e0e179a2e1f3c0f11ff1d4cfc9cb56ed17715 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Thu, 30 May 2024 16:41:30 +0200 Subject: [PATCH] fixup! ffi: expose the abort handle after sending an event --- bindings/matrix-sdk-ffi/src/timeline/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bindings/matrix-sdk-ffi/src/timeline/mod.rs b/bindings/matrix-sdk-ffi/src/timeline/mod.rs index 017856e94c3..5bda7da42f9 100644 --- a/bindings/matrix-sdk-ffi/src/timeline/mod.rs +++ b/bindings/matrix-sdk-ffi/src/timeline/mod.rs @@ -227,9 +227,9 @@ impl Timeline { pub async fn send( self: Arc, msg: Arc, - ) -> Result { + ) -> Result, ClientError> { match self.inner.send((*msg).to_owned().with_relation(None).into()).await { - Ok(handle) => Ok(AbortSendHandle { inner: Mutex::new(Some(handle)) }), + Ok(handle) => Ok(Arc::new(AbortSendHandle { inner: Mutex::new(Some(handle)) })), Err(err) => { error!("error when sending a message: {err}"); Err(anyhow::anyhow!(err).into())