Skip to content

Commit

Permalink
send queue: use the transaction id generated and saved in the db for …
Browse files Browse the repository at this point in the history
…network queries

Intense facepalm energy here.
  • Loading branch information
bnjbvr committed Jul 25, 2024
1 parent 91764eb commit b023b7d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions crates/matrix-sdk/src/send_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,11 @@ impl QueueStorage {
);

store
.save_send_queue_event(&self.room_id, TransactionId::new(), serializable)
.save_send_queue_event(
&self.room_id,
de.own_transaction_id.into(),
serializable,
)
.await
.map_err(RoomSendQueueStorageError::StorageError)?;
} else {
Expand Down Expand Up @@ -887,7 +891,9 @@ impl QueueStorage {
// Note: no reason is provided because we materialize the intent of "cancel
// sending the parent event".

if let Err(err) = room.redact(&event_id, None, None).await {
if let Err(err) =
room.redact(&event_id, None, Some(de.own_transaction_id.into())).await
{
warn!("error when sending a redact for {event_id}: {err}");
}
} else {
Expand Down

0 comments on commit b023b7d

Please sign in to comment.