Fix bug in DTG

This commit is contained in:
Erik Johnston 2018-11-30 12:08:25 +00:00 committed by Brendan Abolivier
parent 549e580dc9
commit b76f1e2cb8

View file

@ -555,7 +555,7 @@ class EventsWorkerStore(SQLBaseStore):
else: else:
event_id_after, ts_after = None, None event_id_after, ts_after = None, None
if event_id_before and event_id_before: if event_id_before and event_id_after:
# Return the closest one # Return the closest one
if (timestamp - ts_before) < (ts_after - timestamp): if (timestamp - ts_before) < (ts_after - timestamp):
return event_id_before return event_id_before