summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2016-04-29 14:36:45 +0100
committerDavid Baker <dave@matrix.org>2016-04-29 14:36:45 +0100
commit3facde2536f392477d59c2e03be2f2fb07e383dc (patch)
tree08538e1950762f9e5faaf3e8ab60b82a7660702f /synapse
parentStop processing notifs once we've sent a mail (diff)
downloadsynapse-3facde2536f392477d59c2e03be2f2fb07e383dc.tar.xz
Remove rather pointless get function
Diffstat (limited to 'synapse')
-rw-r--r--synapse/push/emailpusher.py10
1 files changed, 1 insertions, 9 deletions
diff --git a/synapse/push/emailpusher.py b/synapse/push/emailpusher.py
index 68f59a3faa..62e1e40326 100644
--- a/synapse/push/emailpusher.py
+++ b/synapse/push/emailpusher.py
@@ -139,9 +139,7 @@ class EmailPusher(object):
             notif_ready_at = received_at + DELAY_BEFORE_MAIL_MS
 
             room_ready_at = self.room_ready_to_notify_at(
-                push_action['room_id'], self.get_room_last_notif_ts(
-                    last_notifs, push_action['room_id']
-                )
+                push_action['room_id'], last_notifs.get(push_action['room_id'], 0)
             )
 
             should_notify_at = max(notif_ready_at, room_ready_at)
@@ -184,12 +182,6 @@ class EmailPusher(object):
     def seconds_until(self, ts_msec):
         return (ts_msec - self.clock.time_msec()) / 1000
 
-    def get_room_last_notif_ts(self, last_notif_by_room, room_id):
-        if room_id in last_notif_by_room:
-            return last_notif_by_room[room_id]
-        else:
-            return 0
-
     def get_room_throttle_ms(self, room_id):
         if room_id in self.throttle_params:
             return self.throttle_params[room_id]["throttle_ms"]