mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-01-02 07:56:10 -05:00
Merge pull request #3391 from t3chguy/t3chguy/default_inviter_display_name_3pid
if inviter_display_name == ""||None then default to inviter MXID
This commit is contained in:
commit
b0b5566f36
1
changelog.d/3391.bugfix
Normal file
1
changelog.d/3391.bugfix
Normal file
@ -0,0 +1 @@
|
|||||||
|
Default inviter_display_name to mxid for email invites
|
@ -708,6 +708,10 @@ class RoomMemberHandler(object):
|
|||||||
inviter_display_name = member_event.content.get("displayname", "")
|
inviter_display_name = member_event.content.get("displayname", "")
|
||||||
inviter_avatar_url = member_event.content.get("avatar_url", "")
|
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_room_alias = ""
|
||||||
canonical_alias_event = room_state.get((EventTypes.CanonicalAlias, ""))
|
canonical_alias_event = room_state.get((EventTypes.CanonicalAlias, ""))
|
||||||
if canonical_alias_event:
|
if canonical_alias_event:
|
||||||
|
Loading…
Reference in New Issue
Block a user