From a27659c73f9e4db0d8b8bcbc9d78adfe9f876d68 Mon Sep 17 00:00:00 2001 From: nexy7574 Date: Thu, 11 Sep 2025 17:55:10 +0100 Subject: [PATCH] fix(hydra): Don't serialise null room IDs in PDUs --- src/core/matrix/pdu.rs | 1 + src/service/rooms/timeline/backfill.rs | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/matrix/pdu.rs b/src/core/matrix/pdu.rs index 7d4ac3ce..c7fb0d65 100644 --- a/src/core/matrix/pdu.rs +++ b/src/core/matrix/pdu.rs @@ -31,6 +31,7 @@ use crate::Result; pub struct Pdu { pub event_id: OwnedEventId, + #[serde(skip_serializing_if = "Option::is_none")] pub room_id: Option, pub sender: OwnedUserId, diff --git a/src/service/rooms/timeline/backfill.rs b/src/service/rooms/timeline/backfill.rs index 603b277e..77014c32 100644 --- a/src/service/rooms/timeline/backfill.rs +++ b/src/service/rooms/timeline/backfill.rs @@ -7,7 +7,6 @@ use conduwuit_core::{ event::Event, pdu::{PduCount, PduId, RawPduId}, }, - trace, utils::{IterStream, ReadyExt}, validated, warn, };