Fix account unreads not updated from old events

This commit is contained in:
miruka 2020-09-16 10:57:29 -04:00
parent 4dacc3a12d
commit 04daae8328

View File

@ -2107,7 +2107,11 @@ class MatrixClient(nio.AsyncClient):
model[item.id] = item model[item.id] = item
await self.set_room_last_event(room.room_id, item) await self.set_room_last_event(room.room_id, item)
if from_us or await self.event_is_past(ev): if from_us:
return item
if await self.event_is_past(ev):
await self.update_account_unread_counts()
return item return item
# Alerts & notifications # Alerts & notifications