summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorDavid Baker <dbkr@matrix.org>2015-01-31 12:48:06 +0000
committerDavid Baker <dbkr@matrix.org>2015-01-31 12:48:06 +0000
commit365e007bee27e230f1280a2174cfc9abfb2deac2 (patch)
treef0b932c5d82bcbb39425a413792406403247646f /synapse
parentfix OSX stuff and typos (diff)
downloadsynapse-365e007bee27e230f1280a2174cfc9abfb2deac2.tar.xz
Ignore empty strings for display names & room names in notifications
Diffstat (limited to 'synapse')
-rw-r--r--synapse/push/httppusher.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/push/httppusher.py b/synapse/push/httppusher.py
index d4c5f03b01..7c6953c989 100644
--- a/synapse/push/httppusher.py
+++ b/synapse/push/httppusher.py
@@ -92,9 +92,9 @@ class HttpPusher(Pusher):
 
         if len(ctx['aliases']):
             d['notification']['room_alias'] = ctx['aliases'][0]
-        if 'sender_display_name' in ctx:
+        if 'sender_display_name' in ctx and len(ctx['sender_display_name']) > 0:
             d['notification']['sender_display_name'] = ctx['sender_display_name']
-        if 'name' in ctx:
+        if 'name' in ctx and len(ctx['name']) > 0:
             d['notification']['room_name'] = ctx['name']
 
         defer.returnValue(d)