Skip to content

Commit

Permalink
send queue: early return if there are no dependent events to handle
Browse files Browse the repository at this point in the history
  • Loading branch information
bnjbvr committed Aug 26, 2024
1 parent 9cc39c2 commit 8fdc088
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/matrix-sdk/src/send_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1019,6 +1019,9 @@ impl QueueStorage {
.map_err(RoomSendQueueStorageError::StorageError)?;

let num_initial_dependent_events = dependent_events.len();
if num_initial_dependent_events == 0 {
return Ok(());
}

let canonicalized_dependent_events = canonicalize_dependent_events(&dependent_events);

Expand Down

0 comments on commit 8fdc088

Please sign in to comment.