1
0
Fork 0
mirror of https://gitlab.com/famedly/conduit.git synced 2024-11-09 06:11:04 +01:00

fix sync not firing on new events in room

This commit is contained in:
Jonathan de Jong 2021-09-08 14:50:44 +02:00
parent 562a2524d7
commit 23c5ec8099

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(