mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-02-10 08:08:26 -05:00
Ensure we pass positive ints to delay function
This commit is contained in:
parent
b7442c3e2b
commit
7455ba436a
@ -218,7 +218,8 @@ class EmailPusher(object):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def seconds_until(self, ts_msec):
|
def seconds_until(self, ts_msec):
|
||||||
return (ts_msec - self.clock.time_msec()) / 1000
|
secs = (ts_msec - self.clock.time_msec()) / 1000
|
||||||
|
return max(secs, 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:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user