summary refs log tree commit diff
path: root/synapse/events/builder.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-12-10 10:06:12 +0000
committerErik Johnston <erik@matrix.org>2014-12-10 11:37:47 +0000
commit95aa903ffa77effcbca2a510744c3c3fa9b46ed3 (patch)
treeda5d6eeec5da95549d19e97a072ce575c0fadf41 /synapse/events/builder.py
parentThis is to test jenkins (diff)
downloadsynapse-95aa903ffa77effcbca2a510744c3c3fa9b46ed3.tar.xz
Try and figure out how and why signatures are being changed.
Diffstat (limited to 'synapse/events/builder.py')
-rw-r--r--synapse/events/builder.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/synapse/events/builder.py b/synapse/events/builder.py
index 127b8fa904..642264e9f3 100644
--- a/synapse/events/builder.py
+++ b/synapse/events/builder.py
@@ -54,10 +54,9 @@ class EventBuilderFactory(object):
         return e_id.to_string()
 
     def new(self, key_values={}):
-        if "event_id" not in key_values:
-            key_values["event_id"] = self.create_event_id()
+        key_values["event_id"] = self.create_event_id()
 
-        time_now = self.clock.time_msec()
+        time_now = int(self.clock.time_msec())
 
         key_values.setdefault("origin", self.hostname)
         key_values.setdefault("origin_server_ts", time_now)
@@ -66,4 +65,6 @@ class EventBuilderFactory(object):
             age = key_values["unsigned"].pop("age", 0)
             key_values["unsigned"].setdefault("age_ts", time_now - age)
 
+        key_values["signatures"] = {}
+
         return EventBuilder(key_values=key_values,)