diff options
author | Erik Johnston <erik@matrix.org> | 2016-10-31 15:00:19 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-10-31 15:52:36 +0000 |
commit | babfa01cc7645337299ee4d4ec6fb377b48f89ab (patch) | |
tree | e6819df43606e82ed680029d6d63a27993f22e24 /synapse/handlers/room_member.py | |
parent | Migrate old profile data (diff) | |
download | synapse-babfa01cc7645337299ee4d4ec6fb377b48f89ab.tar.xz |
Use new tables
Diffstat (limited to 'synapse/handlers/room_member.py')
-rw-r--r-- | synapse/handlers/room_member.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/synapse/handlers/room_member.py b/synapse/handlers/room_member.py index ba49075a20..73dcf326a6 100644 --- a/synapse/handlers/room_member.py +++ b/synapse/handlers/room_member.py @@ -245,8 +245,14 @@ class RoomMemberHandler(BaseHandler): content["membership"] = Membership.JOIN profile = self.hs.get_handlers().profile_handler - content["displayname"] = yield profile.get_displayname(target) - content["avatar_url"] = yield profile.get_avatar_url(target) + + display_name = yield profile.get_displayname(target) + if display_name: + content["displayname"] = display_name + + avatar_url = yield profile.get_avatar_url(target) + if avatar_url: + content["avatar_url"] = avatar_url if requester.is_guest: content["kind"] = "guest" |