diff options
author | Brendan Abolivier <babolivier@matrix.org> | 2020-06-17 15:10:09 +0100 |
---|---|---|
committer | Brendan Abolivier <babolivier@matrix.org> | 2020-06-17 15:10:44 +0100 |
commit | 5a5cf6460ec4b4bb3a07813c36717b5a8d4a697c (patch) | |
tree | 0e17cd8dd2c84fa8eb3cfae80ca6790bfdb1d725 /synapse/storage/data_stores | |
parent | Ignore the UI Auth sessions when porting from sqlite to postgresql (#7711) (diff) | |
download | synapse-5a5cf6460ec4b4bb3a07813c36717b5a8d4a697c.tar.xz |
Fix unread counts in sync
* Always return an unread_count in get_unread_event_push_actions_by_room_for_user * Don't always expect unread_count to be there so we don't take out sync entirely if something goes wrong
Diffstat (limited to 'synapse/storage/data_stores')
-rw-r--r-- | synapse/storage/data_stores/main/event_push_actions.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/storage/data_stores/main/event_push_actions.py b/synapse/storage/data_stores/main/event_push_actions.py index ba1b33a0a9..815d52ab4c 100644 --- a/synapse/storage/data_stores/main/event_push_actions.py +++ b/synapse/storage/data_stores/main/event_push_actions.py @@ -123,7 +123,7 @@ class EventPushActionsWorkerStore(SQLBaseStore): txn.execute(sql, (room_id, last_read_event_id)) results = txn.fetchall() if len(results) == 0: - return {"notify_count": 0, "highlight_count": 0} + return {"notify_count": 0, "highlight_count": 0, "unread_count": 0} stream_ordering = results[0][0] |