mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-18 16:02:15 +01:00
Remove rather pointless get function
This commit is contained in:
parent
4364ea1272
commit
3facde2536
1 changed files with 1 additions and 9 deletions
|
@ -139,9 +139,7 @@ class EmailPusher(object):
|
||||||
notif_ready_at = received_at + DELAY_BEFORE_MAIL_MS
|
notif_ready_at = received_at + DELAY_BEFORE_MAIL_MS
|
||||||
|
|
||||||
room_ready_at = self.room_ready_to_notify_at(
|
room_ready_at = self.room_ready_to_notify_at(
|
||||||
push_action['room_id'], self.get_room_last_notif_ts(
|
push_action['room_id'], last_notifs.get(push_action['room_id'], 0)
|
||||||
last_notifs, push_action['room_id']
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
should_notify_at = max(notif_ready_at, room_ready_at)
|
should_notify_at = max(notif_ready_at, room_ready_at)
|
||||||
|
@ -184,12 +182,6 @@ class EmailPusher(object):
|
||||||
def seconds_until(self, ts_msec):
|
def seconds_until(self, ts_msec):
|
||||||
return (ts_msec - self.clock.time_msec()) / 1000
|
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):
|
def get_room_throttle_ms(self, room_id):
|
||||||
if room_id in self.throttle_params:
|
if room_id in self.throttle_params:
|
||||||
return self.throttle_params[room_id]["throttle_ms"]
|
return self.throttle_params[room_id]["throttle_ms"]
|
||||||
|
|
Loading…
Reference in a new issue