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: 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(+) (limited to 'synapse/handlers/room_member.py') diff --git a/synapse/handlers/room_member.py b/synapse/handlers/room_member.py index b3f979b246..1b8dfa8254 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: -- cgit 1.4.1