Compare commits

...

1 Commits

Author SHA1 Message Date
Ginger 5cb0595965 fix: Properly sync newly created rooms 2026-07-11 15:09:19 +00:00
2 changed files with 16 additions and 10 deletions
+1
View File
@@ -0,0 +1 @@
Fixed newly created rooms failing to sync properly in clients using legacy sync.
+15 -10
View File
@@ -381,16 +381,21 @@ async fn fetch_shortstatehashes(
| Some((_, pdu_after_last_sync_end)) => {
trace!(?pdu_after_last_sync_end.event_id, "pdu at last sync end");
Some(
services
.rooms
.state_accessor
.pdu_shortstatehash(&pdu_after_last_sync_end.event_id)
.await
.map_err(|err| {
err!("Last sync end PDU has no shortstatehash: {err}")
}),
)
if pdu_after_last_sync_end.kind == RoomCreate {
// Room create events have no previous state
None
} else {
Some(
services
.rooms
.state_accessor
.pdu_shortstatehash(&pdu_after_last_sync_end.event_id)
.await
.map_err(|err| {
err!("Last sync end PDU has no shortstatehash: {err}")
}),
)
}
},
| None => {
// No events have been sent since the last sync, or we just joined this room