diff options
author | Erik Johnston <erik@matrix.org> | 2019-06-17 13:54:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-17 13:54:35 +0100 |
commit | dd927b29e1562e82ee4b90056a91dafbccf57103 (patch) | |
tree | c5a9bebeb732e47b95a25dcf5b13a7255560d6a3 /synapse/push/presentable_names.py | |
parent | Merge pull request #5389 from matrix-org/erikj/renew_attestations_on_master (diff) | |
parent | Newsfile (diff) | |
download | synapse-dd927b29e1562e82ee4b90056a91dafbccf57103.tar.xz |
Merge pull request #5388 from matrix-org/erikj/fix_email_push
Fix email notifications for unnamed rooms with multiple people
Diffstat (limited to 'synapse/push/presentable_names.py')
-rw-r--r-- | synapse/push/presentable_names.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/synapse/push/presentable_names.py b/synapse/push/presentable_names.py index eef6e18c2e..0c66702325 100644 --- a/synapse/push/presentable_names.py +++ b/synapse/push/presentable_names.py @@ -162,6 +162,17 @@ def calculate_room_name(store, room_state_ids, user_id, fallback_to_members=True def descriptor_from_member_events(member_events): + """Get a description of the room based on the member events. + + Args: + member_events (Iterable[FrozenEvent]) + + Returns: + str + """ + + member_events = list(member_events) + if len(member_events) == 0: return "nobody" elif len(member_events) == 1: |