diff options
author | Erik Johnston <erik@matrix.org> | 2016-07-28 10:37:43 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-07-28 10:37:43 +0100 |
commit | 18e044628ed9cd6e034967e283784cf0a284a17d (patch) | |
tree | 497cc68775bc8d05883ce3eed901cec955dcfb83 /synapse/util | |
parent | Bump CHANGES and version (diff) | |
parent | Merge pull request #961 from matrix-org/dbkr/fix_push_invite_name (diff) | |
download | synapse-18e044628ed9cd6e034967e283784cf0a284a17d.tar.xz |
Merge branch 'develop' of github.com:matrix-org/synapse into release-v0.17.0
Diffstat (limited to 'synapse/util')
-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" |