Skip to content

Commit 84fa087

Browse files
committed
chore(send_queue): Make parent_is_thumbnail_upload available outside of unstable-msc4274 to use it during media progress reporting later
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
1 parent ed36540 commit 84fa087

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

crates/matrix-sdk-base/src/store/send_queue.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,6 @@ pub enum DependentQueuedRequestKind {
238238
related_to: OwnedTransactionId,
239239

240240
/// Whether the depended upon request was a thumbnail or a file upload.
241-
#[cfg(feature = "unstable-msc4274")]
242241
#[serde(default = "default_parent_is_thumbnail_upload")]
243242
parent_is_thumbnail_upload: bool,
244243
},
@@ -275,7 +274,6 @@ pub enum DependentQueuedRequestKind {
275274
/// If parent_is_thumbnail_upload is missing, we assume the request is for a
276275
/// file upload following a thumbnail upload. This was the only possible case
277276
/// before parent_is_thumbnail_upload was introduced.
278-
#[cfg(feature = "unstable-msc4274")]
279277
fn default_parent_is_thumbnail_upload() -> bool {
280278
true
281279
}

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

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,7 +1467,6 @@ impl QueueStorage {
14671467
content_type: content_type.to_string(),
14681468
cache_key: file_media_request,
14691469
related_to: send_event_txn,
1470-
#[cfg(feature = "unstable-msc4274")]
14711470
parent_is_thumbnail_upload: true,
14721471
},
14731472
)
@@ -1859,25 +1858,12 @@ impl QueueStorage {
18591858
content_type,
18601859
cache_key,
18611860
related_to,
1862-
#[cfg(feature = "unstable-msc4274")]
18631861
parent_is_thumbnail_upload,
18641862
} => {
18651863
let Some(parent_key) = parent_key else {
18661864
// Not finished yet, we should retry later => false.
18671865
return Ok(false);
18681866
};
1869-
let parent_is_thumbnail_upload = {
1870-
cfg_if::cfg_if! {
1871-
if #[cfg(feature = "unstable-msc4274")] {
1872-
parent_is_thumbnail_upload
1873-
} else {
1874-
// Before parent_is_thumbnail_upload was introduced, the only
1875-
// possible usage for this request was a file upload following
1876-
// a thumbnail upload.
1877-
true
1878-
}
1879-
}
1880-
};
18811867
self.handle_dependent_file_or_thumbnail_upload(
18821868
client,
18831869
dependent_request.own_transaction_id.into(),

0 commit comments

Comments
 (0)