summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2016-05-24 15:11:28 +0100
committerDavid Baker <dave@matrix.org>2016-05-24 15:12:05 +0100
commitb007ee46065ed25ed1ca248cf47c19ee7f4b56c2 (patch)
tree9ae5a0e268618b37512b60457eea1d0f91873573 /synapse
parenttweak mail notifs (diff)
downloadsynapse-b007ee46065ed25ed1ca248cf47c19ee7f4b56c2.tar.xz
Check for presence of 'avatar_url' key
Diffstat (limited to 'synapse')
-rw-r--r--synapse/push/mailer.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/push/mailer.py b/synapse/push/mailer.py
index d8a0c35c79..3ae92d1574 100644
--- a/synapse/push/mailer.py
+++ b/synapse/push/mailer.py
@@ -259,7 +259,9 @@ class Mailer(object):
 
         sender_state_event = room_state[("m.room.member", event.sender)]
         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
         # sender_hash % the number of default images to choose from