Merge branch 'fixes' into 'next'

Avoid panic when client is confused about rooms

See merge request famedly/conduit!588
This commit is contained in:
Timo Kösters 2024-02-28 16:19:48 +00:00 committed by GitLab
commit 99ab234f40
No known key found for this signature in database
4 changed files with 56 additions and 2 deletions

View file

@ -1476,6 +1476,9 @@ pub async fn sync_events_v4_route(
let mut known_subscription_rooms = BTreeSet::new();
for (room_id, room) in &body.room_subscriptions {
if !services().rooms.metadata.exists(room_id)? {
continue;
}
let todo_room = todo_rooms
.entry(room_id.clone())
.or_insert((BTreeSet::new(), 0, u64::MAX));