Merge branch 'roomidshort-fix' into 'next'

fix sync not firing on new events in room

See merge request famedly/conduit!194
next
Timo Kösters 2021-09-08 13:39:05 +00:00
commit 4aacafc298
1 changed files with 10 additions and 1 deletions

View File

@ -815,12 +815,21 @@ impl Database {
// Events for rooms we are in // Events for rooms we are in
for room_id in self.rooms.rooms_joined(user_id).filter_map(|r| r.ok()) { 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 roomid_bytes = room_id.as_bytes().to_vec();
let mut roomid_prefix = roomid_bytes.clone(); let mut roomid_prefix = roomid_bytes.clone();
roomid_prefix.push(0xff); roomid_prefix.push(0xff);
// PDUs // PDUs
futures.push(self.rooms.pduid_pdu.watch_prefix(&roomid_prefix)); futures.push(self.rooms.pduid_pdu.watch_prefix(&short_roomid));
// EDUs // EDUs
futures.push( futures.push(