diff options
author | David Baker <dave@matrix.org> | 2016-04-28 11:49:36 +0100 |
---|---|---|
committer | David Baker <dave@matrix.org> | 2016-04-28 11:49:36 +0100 |
commit | ebbabc4986371c83d1d2659d10b27caad9b47951 (patch) | |
tree | b21c1e6198779608514d660958f469a7bab96715 /synapse/util | |
parent | Add the jinja template for individual notifs (diff) | |
download | synapse-ebbabc4986371c83d1d2659d10b27caad9b47951.tar.xz |
Handle room invites in email notifs
Diffstat (limited to 'synapse/util')
-rw-r--r-- | synapse/util/presentable_names.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/util/presentable_names.py b/synapse/util/presentable_names.py index 2ae01e453d..f80a7fe58e 100644 --- a/synapse/util/presentable_names.py +++ b/synapse/util/presentable_names.py @@ -52,6 +52,9 @@ def calculate_room_name(room_state, user_id, fallback_to_members=True): if len(the_aliases) > 0 and _looks_like_an_alias(the_aliases[0]): return the_aliases[0] + if not fallback_to_members: + return None + my_member_event = None if ("m.room.member", user_id) in room_state: my_member_event = room_state[("m.room.member", user_id)] @@ -66,9 +69,6 @@ def calculate_room_name(room_state, user_id, fallback_to_members=True): else: return "Room Invite" - if not fallback_to_members: - return None - # we're going to have to generate a name based on who's in the room, # so find out who is in the room that isn't the user. if "m.room.member" in room_state_bytype: |