1
0
Fork 0
mirror of https://gitlab.com/famedly/conduit.git synced 2024-12-29 12:04:35 +01:00

Merge branch 'roomidshort-fix' into 'next'

fix sync not firing on new events in room

See merge request famedly/conduit!194
This commit is contained in:
Timo Kösters 2021-09-08 13:39:05 +00:00
commit 4aacafc298

View file

@ -815,12 +815,21 @@ impl Database {
// Events for rooms we are in
for room_id in self.rooms.rooms_joined(user_id).filter_map(|r| r.ok()) {
let short_roomid = self
.rooms
.get_shortroomid(&room_id)
.ok()
.flatten()
.expect("room exists")
.to_be_bytes()
.to_vec();
let roomid_bytes = room_id.as_bytes().to_vec();
let mut roomid_prefix = roomid_bytes.clone();
roomid_prefix.push(0xff);
// PDUs
futures.push(self.rooms.pduid_pdu.watch_prefix(&roomid_prefix));
futures.push(self.rooms.pduid_pdu.watch_prefix(&short_roomid));
// EDUs
futures.push(