summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2016-07-28 10:36:41 +0100
committerGitHub <noreply@github.com>2016-07-28 10:36:41 +0100
commitb557b682d959d1abc937346197f13037dce4a4dd (patch)
treebd34246def019b7f96c24671de2c9ebe56480a41
parentMerge pull request #960 from matrix-org/rav/support_r0.2 (diff)
parentDon't include name of room for invites in push (diff)
downloadsynapse-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
-rw-r--r--synapse/util/presentable_names.py5
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"