summary refs log tree commit diff
path: root/synapse/rest
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@arasphere.net>2016-09-09 00:09:51 +0100
committerGitHub <noreply@github.com>2016-09-09 00:09:51 +0100
commitb8f84f99ff3c645dde6ab6c0498b272bfcc325fe (patch)
treef6622c08ca7a33bf47c35748d773c19f6d55445f /synapse/rest
parentMerge pull request #1080 from matrix-org/dbkr/fix_notifications_api_with_from (diff)
parentImplement `only=highlight` on `/notifications` (diff)
downloadsynapse-b8f84f99ff3c645dde6ab6c0498b272bfcc325fe.tar.xz
Merge pull request #1081 from matrix-org/dbkr/notifications_only_highlight
Implement `only=highlight` on `/notifications`
Diffstat (limited to 'synapse/rest')
-rw-r--r--synapse/rest/client/v2_alpha/notifications.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/rest/client/v2_alpha/notifications.py b/synapse/rest/client/v2_alpha/notifications.py
index f1a48acf07..fd2a3d69d4 100644
--- a/synapse/rest/client/v2_alpha/notifications.py
+++ b/synapse/rest/client/v2_alpha/notifications.py
@@ -45,11 +45,12 @@ class NotificationsServlet(RestServlet):
 
         from_token = parse_string(request, "from", required=False)
         limit = parse_integer(request, "limit", default=50)
+        only = parse_string(request, "only", required=False)
 
         limit = min(limit, 500)
 
         push_actions = yield self.store.get_push_actions_for_user(
-            user_id, from_token, limit
+            user_id, from_token, limit, only_highlight=(only == "highlight")
         )
 
         receipts_by_room = yield self.store.get_receipts_for_user_with_orderings(