Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Fix undefined room_id in make_summary_text
Browse files Browse the repository at this point in the history
This would break notifications about un-named rooms when processing
notifications in a batch.
  • Loading branch information
babolivier committed Mar 9, 2020
1 parent 87c6557 commit aee2bae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion synapse/push/mailer.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,10 +555,12 @@ def make_summary_text(
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]
}
)

Expand Down

0 comments on commit aee2bae

Please sign in to comment.