diff options
author | Erik Johnston <erikj@jki.re> | 2016-07-28 10:36:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-28 10:36:41 +0100 |
commit | b557b682d959d1abc937346197f13037dce4a4dd (patch) | |
tree | bd34246def019b7f96c24671de2c9ebe56480a41 /synapse | |
parent | Merge pull request #960 from matrix-org/rav/support_r0.2 (diff) | |
parent | Don't include name of room for invites in push (diff) | |
download | synapse-b557b682d959d1abc937346197f13037dce4a4dd.tar.xz |
Merge pull request #961 from matrix-org/dbkr/fix_push_invite_name
Don't include name of room for invites in push
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/util/presentable_names.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/util/presentable_names.py b/synapse/util/presentable_names.py index 4c54812e6f..f68676e9e7 100644 --- a/synapse/util/presentable_names.py +++ b/synapse/util/presentable_names.py @@ -83,7 +83,10 @@ def calculate_room_name(room_state, user_id, fallback_to_members=True, ): if ("m.room.member", my_member_event.sender) in room_state: inviter_member_event = room_state[("m.room.member", my_member_event.sender)] - return "Invite from %s" % (name_from_member_event(inviter_member_event),) + if fallback_to_single_member: + return "Invite from %s" % (name_from_member_event(inviter_member_event),) + else: + return None else: return "Room Invite" |