ui: Add logging for send-event cancellation

This commit is contained in:
Jonas Platte
2023-11-27 16:53:02 +01:00
committed by Jonas Platte
parent 932f12e76d
commit 246a128ec3
2 changed files with 3 additions and 0 deletions

View File

@@ -578,8 +578,10 @@ impl<P: RoomDataProvider> TimelineInner<P> {
rfind_event_item(&state.items, |it| it.transaction_id() == Some(txn_id))
{
state.items.remove(idx);
debug!("Discarded local echo");
true
} else {
debug!("Can't find local echo to discard");
false
}
}

View File

@@ -604,6 +604,7 @@ impl Timeline {
/// state of `SendState::NotYetSent` might be supported in the future as
/// well, but there can be no guarantee for that actually stopping the
/// event from reaching the server.
#[instrument(skip(self))]
pub async fn cancel_send(&self, txn_id: &TransactionId) -> bool {
self.inner.discard_local_echo(txn_id).await
}