From 8fdc088b6cbafd98276da4893085551c8982c208 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Tue, 13 Aug 2024 10:36:31 +0200 Subject: [PATCH] send queue: early return if there are no dependent events to handle --- crates/matrix-sdk/src/send_queue.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/matrix-sdk/src/send_queue.rs b/crates/matrix-sdk/src/send_queue.rs index e5f7fa089f6..683020e61a7 100644 --- a/crates/matrix-sdk/src/send_queue.rs +++ b/crates/matrix-sdk/src/send_queue.rs @@ -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);