mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
Check for presence of 'avatar_url' key
This commit is contained in:
parent
95b86e6dad
commit
b007ee4606
@ -259,7 +259,9 @@ class Mailer(object):
|
|||||||
|
|
||||||
sender_state_event = room_state[("m.room.member", event.sender)]
|
sender_state_event = room_state[("m.room.member", event.sender)]
|
||||||
sender_name = name_from_member_event(sender_state_event)
|
sender_name = name_from_member_event(sender_state_event)
|
||||||
sender_avatar_url = sender_state_event.content["avatar_url"]
|
sender_avatar_url = None
|
||||||
|
if "avatar_url" in sender_state_event.content:
|
||||||
|
sender_avatar_url = sender_state_event.content["avatar_url"]
|
||||||
|
|
||||||
# 'hash' for deterministically picking default images: use
|
# 'hash' for deterministically picking default images: use
|
||||||
# sender_hash % the number of default images to choose from
|
# sender_hash % the number of default images to choose from
|
||||||
|
Loading…
Reference in New Issue
Block a user