diff options
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/api/events/factory.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/api/events/factory.py b/synapse/api/events/factory.py index 750096c618..9134c82eff 100644 --- a/synapse/api/events/factory.py +++ b/synapse/api/events/factory.py @@ -69,6 +69,10 @@ class EventFactory(object): kwargs["type"] = etype if "event_id" not in kwargs: kwargs["event_id"] = self.create_event_id() + kwargs["origin"] = self.hs.hostname + else: + ev_id = self.hs.parse_eventid(kwargs["event_id"]) + kwargs["origin"] = ev_id.domain if "origin_server_ts" not in kwargs: kwargs["origin_server_ts"] = int(self.clock.time_msec()) |