Skip to content

Commit

Permalink
fixup! ffi: expose the abort handle after sending an event
Browse files Browse the repository at this point in the history
  • Loading branch information
bnjbvr committed May 31, 2024
1 parent f69f4ee commit e70e0e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bindings/matrix-sdk-ffi/src/timeline/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,9 @@ impl Timeline {
pub async fn send(
self: Arc<Self>,
msg: Arc<RoomMessageEventContentWithoutRelation>,
) -> Result<AbortSendHandle, ClientError> {
) -> Result<Arc<AbortSendHandle>, 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())
Expand Down

0 comments on commit e70e0e1

Please sign in to comment.