From 529a2b91a4d88a7553ddb419c5ec60b4d24b1449 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Thu, 12 Mar 2026 02:10:16 +0000 Subject: [PATCH] Workaround Mxc serialization assertion. Signed-off-by: Jason Volk --- src/service/media/data.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/service/media/data.rs b/src/service/media/data.rs index 0e26fb69..dd54e847 100644 --- a/src/service/media/data.rs +++ b/src/service/media/data.rs @@ -68,11 +68,14 @@ impl Data { let value = (unused_expires_at, user); debug!(?mxc, ?user, ?unused_expires_at, "Inserting pending"); - self.mediaid_pending.put(mxc, value); + self.mediaid_pending + .raw_put(mxc.to_string(), value); } /// Remove a pending MXC URI from the database - pub(super) fn remove_pending_mxc(&self, mxc: &Mxc<'_>) { self.mediaid_pending.del(mxc); } + pub(super) fn remove_pending_mxc(&self, mxc: &Mxc<'_>) { + self.mediaid_pending.remove(&mxc.to_string()); + } /// Count the number of pending MXC URIs for a specific user pub(super) async fn count_pending_mxc_for_user(&self, user_id: &UserId) -> (usize, u64) { @@ -96,7 +99,7 @@ impl Data { type Value<'a> = (u64, OwnedUserId); self.mediaid_pending - .qry(mxc) + .get(&mxc.to_string()) .await .deserialized() .map(|(expires_at, user_id): Value<'_>| (user_id, expires_at))