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,)
|