summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2018-07-27 10:08:39 +0100
committerGitHub <noreply@github.com>2018-07-27 10:08:39 +0100
commitb0b5566f36d126a892425ac4939b2028a3980efe (patch)
tree9750477cdc9998b3aa460bc63a81d2ee917df8f9 /synapse
parentMerge pull request #3469 from DJViking/master (diff)
parentadd changelog entry for PR#3391 (diff)
downloadsynapse-b0b5566f36d126a892425ac4939b2028a3980efe.tar.xz
Merge pull request #3391 from t3chguy/t3chguy/default_inviter_display_name_3pid
if inviter_display_name == ""||None then default to inviter MXID
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/room_member.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/handlers/room_member.py b/synapse/handlers/room_member.py
index a832d91809..0d4a3f4677 100644
--- a/synapse/handlers/room_member.py
+++ b/synapse/handlers/room_member.py
@@ -708,6 +708,10 @@ class RoomMemberHandler(object):
             inviter_display_name = member_event.content.get("displayname", "")
             inviter_avatar_url = member_event.content.get("avatar_url", "")
 
+        # if user has no display name, default to their MXID
+        if not inviter_display_name:
+            inviter_display_name = user.to_string()
+
         canonical_room_alias = ""
         canonical_alias_event = room_state.get((EventTypes.CanonicalAlias, ""))
         if canonical_alias_event: