summary refs log tree commit diff
path: root/synapse/storage/events.py
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@arasphere.net>2016-05-10 16:30:05 +0200
committerMatthew Hodgson <matthew@arasphere.net>2016-05-10 16:30:05 +0200
commitfe97b81c0929fd6cc31e8f0eb432e88ca8ccb045 (patch)
tree0c771563044691d447ea85cf3e3278ef50c07ea9 /synapse/storage/events.py
parentMerge pull request #763 from matrix-org/erikj/ignore_user (diff)
parentMerge remote-tracking branch 'origin/develop' into dbkr/email_notifs (diff)
downloadsynapse-fe97b81c0929fd6cc31e8f0eb432e88ca8ccb045.tar.xz
Merge pull request #759 from matrix-org/dbkr/email_notifs
Send email notifications for missed messages
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 a27b7919cd..4655669ba0 100644
--- a/synapse/storage/events.py
+++ b/synapse/storage/events.py
@@ -144,6 +144,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
         )
@@ -565,6 +566,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
             ],