Skip to content

Commit 99eb7c3

Browse files
committed
Extract variable for default index
1 parent c5d1ef2 commit 99eb7c3

File tree

1 file changed

+3
-2
lines changed
  • crates/matrix-sdk/src/send_queue

1 file changed

+3
-2
lines changed

crates/matrix-sdk/src/send_queue/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,15 +586,16 @@ impl RoomSendQueue {
586586
_ => false,
587587
};
588588

589+
let default_index = 0; // Before MSC4274 only a single file (and thumbnail) could be sent per event.
589590
let index = {
590591
cfg_if::cfg_if! {
591592
if #[cfg(feature = "unstable-msc4274")] {
592593
match &queued_request.kind {
593594
QueuedRequestKind::MediaUpload { accumulated, .. } => accumulated.len() as u64,
594-
_ => 0,
595+
_ => default_index,
595596
};
596597
} else {
597-
0 // Before MSC4274 there were only a single file (and thumbnail) could be sent per event.
598+
default_index
598599
}
599600
}
600601
};

0 commit comments

Comments
 (0)