summary refs log tree commit diff
path: root/synapse/push
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2020-09-04 14:14:22 +0100
committerGitHub <noreply@github.com>2020-09-04 14:14:22 +0100
commit041ee971c9b029dcad0dbfb55d4b9da5711d4cb0 (patch)
treed3a48e8b562c612f2ac267d9b5308982ef307226 /synapse/push
parentFix a regression from calling read_templates. (#8252) (diff)
downloadsynapse-041ee971c9b029dcad0dbfb55d4b9da5711d4cb0.tar.xz
Unread counts fixes (#8254)
* Fixup `ALTER TABLE` database queries

Make the new columns nullable, because doing otherwise can wedge a
server with a big database, as setting a default value rewrites the
table.

* Switch back to using the notifications count in the push badge

Clients are likely to be confused if we send a push but the badge count
is the unread messages one, and not the notifications one.

* Changelog
Diffstat (limited to 'synapse/push')
-rw-r--r--synapse/push/push_tools.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/push/push_tools.py b/synapse/push/push_tools.py
index f7a25571f3..d0145666bf 100644
--- a/synapse/push/push_tools.py
+++ b/synapse/push/push_tools.py
@@ -36,7 +36,7 @@ async def get_badge_count(store, user_id):
             )
             # return one badge count per conversation, as count per
             # message is so noisy as to be almost useless
-            badge += 1 if notifs["unread_count"] else 0
+            badge += 1 if notifs["notify_count"] else 0
     return badge