mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-17 21:53:51 +01:00
Ignore empty strings for display names & room names in notifications
This commit is contained in:
parent
e9dfc4cfae
commit
365e007bee
1 changed files with 2 additions and 2 deletions
|
@ -92,9 +92,9 @@ class HttpPusher(Pusher):
|
||||||
|
|
||||||
if len(ctx['aliases']):
|
if len(ctx['aliases']):
|
||||||
d['notification']['room_alias'] = ctx['aliases'][0]
|
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']
|
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']
|
d['notification']['room_name'] = ctx['name']
|
||||||
|
|
||||||
defer.returnValue(d)
|
defer.returnValue(d)
|
||||||
|
|
Loading…
Reference in a new issue