mirror of
https://mau.dev/maunium/synapse.git
synced 2025-01-21 23:40:21 +01:00
Don't assume all member events have a display nme.
This commit is contained in:
parent
4c0da49d7c
commit
fe10b882b7
1 changed files with 5 additions and 4 deletions
|
@ -204,8 +204,9 @@ class Pusher(object):
|
||||||
event_type='m.room.member',
|
event_type='m.room.member',
|
||||||
state_key=ev['user_id']
|
state_key=ev['user_id']
|
||||||
)
|
)
|
||||||
if len(their_member_events_for_room) > 0:
|
for mev in their_member_events_for_room:
|
||||||
dn = their_member_events_for_room[0].content['displayname']
|
if mev.content['membership'] == 'join' and 'displayname' in mev.content:
|
||||||
|
dn = mev.content['displayname']
|
||||||
if dn is not None:
|
if dn is not None:
|
||||||
ctx['sender_display_name'] = dn
|
ctx['sender_display_name'] = dn
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue