mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 12:36:02 -04:00
First bits of emailpusher
Mostly logic of when to send an email
This commit is contained in:
parent
48af68ba8e
commit
07d765209d
7 changed files with 335 additions and 8 deletions
|
@ -55,6 +55,7 @@ class EventsStore(SQLBaseStore):
|
|||
|
||||
def __init__(self, hs):
|
||||
super(EventsStore, self).__init__(hs)
|
||||
self._clock = hs.get_clock()
|
||||
self.register_background_update_handler(
|
||||
self.EVENT_ORIGIN_SERVER_TS_NAME, self._background_reindex_origin_server_ts
|
||||
)
|
||||
|
@ -427,6 +428,7 @@ class EventsStore(SQLBaseStore):
|
|||
"outlier": event.internal_metadata.is_outlier(),
|
||||
"content": encode_json(event.content).decode("UTF-8"),
|
||||
"origin_server_ts": int(event.origin_server_ts),
|
||||
"received_ts": self._clock.time_msec(),
|
||||
}
|
||||
for event, _ in events_and_contexts
|
||||
],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue