Fix email notifications for large unnamed rooms.
When we try and calculate a description for a room for with no name but multiple other users we threw an exception (due to trying to subscript result of `dict.values()`).pull/5388/head
parent
4f581faa98
commit
928d1ccd73
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue