Fix undefined room_id in make_summary_text

This would break notifications about un-named rooms when processing
notifications in a batch.
This commit is contained in:
Brendan Abolivier 2020-03-09 14:10:19 +00:00
parent 87c65576e0
commit aee2bae952
No known key found for this signature in database
GPG key ID: 1E015C145F1916CD

View file

@ -555,10 +555,12 @@ class Mailer(object):
else:
# If the reason room doesn't have a name, say who the messages
# are from explicitly to avoid, "messages in the Bob room"
room_id = reason["room_id"]
sender_ids = list(
{
notif_events[n["event_id"]].sender
for n in notifs_by_room[reason["room_id"]]
for n in notifs_by_room[room_id]
}
)