summary refs log tree commit diff
path: root/synapse/push
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2020-03-09 14:10:19 +0000
committerBrendan Abolivier <babolivier@matrix.org>2020-03-09 14:10:19 +0000
commitaee2bae9523a639c31c18ef7fab7a8a08ed3db03 (patch)
treec9c1fc7b42e99d17afb3a23df23157506518f03a /synapse/push
parentMove `get_time_of_last_push_action_before` to the `EventPushActionsWorkerStore` (diff)
downloadsynapse-aee2bae9523a639c31c18ef7fab7a8a08ed3db03.tar.xz
Fix undefined `room_id` in `make_summary_text`
This would break notifications about un-named rooms when processing
notifications in a batch.
Diffstat (limited to 'synapse/push')
-rw-r--r--synapse/push/mailer.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/push/mailer.py b/synapse/push/mailer.py
index 4ccaf178ce..73580c1c6c 100644
--- a/synapse/push/mailer.py
+++ b/synapse/push/mailer.py
@@ -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]
                     }
                 )