summary refs log tree commit diff
path: root/synapse/storage/events.py
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2016-04-19 14:24:36 +0100
committerDavid Baker <dave@matrix.org>2016-04-19 14:24:36 +0100
commit07d765209dea12229e70a09784e647611acabcda (patch)
tree08a6e675544322049e0e9ed014afed8a77aa4a78 /synapse/storage/events.py
parentMerge pull request #735 from matrix-org/erikj/media_resource_cleanup (diff)
downloadsynapse-07d765209dea12229e70a09784e647611acabcda.tar.xz
First bits of emailpusher
Mostly logic of when to send an email
Diffstat (limited to 'synapse/storage/events.py')
-rw-r--r--synapse/storage/events.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py
index 21487724ed..dd58e001dc 100644
--- a/synapse/storage/events.py
+++ b/synapse/storage/events.py
@@ -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
             ],