From 94700e55fa93653d678fb5e27322fde4c0a15f3d Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 13 Jun 2018 10:31:01 +0100 Subject: [PATCH 1/2] if inviter_display_name == ""||None then default to inviter MXID to prevent email invite from "None" --- synapse/handlers/room_member.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/synapse/handlers/room_member.py b/synapse/handlers/room_member.py index b3f979b24..1b8dfa825 100644 --- a/synapse/handlers/room_member.py +++ b/synapse/handlers/room_member.py @@ -565,6 +565,10 @@ class RoomMemberHandler(BaseHandler): 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: From 38eaa5280d49df8d0e52f93693a576b7e936bde5 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 24 Jul 2018 17:25:42 +0100 Subject: [PATCH 2/2] add changelog entry for PR#3391 Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- changelog.d/3391.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/3391.bugfix diff --git a/changelog.d/3391.bugfix b/changelog.d/3391.bugfix new file mode 100644 index 000000000..88eeb50df --- /dev/null +++ b/changelog.d/3391.bugfix @@ -0,0 +1 @@ +Default inviter_display_name to mxid for email invites \ No newline at end of file