mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Add 'origin' key to events
This commit is contained in:
parent
82a6b83524
commit
0a8b026ccf
@ -69,6 +69,10 @@ class EventFactory(object):
|
|||||||
kwargs["type"] = etype
|
kwargs["type"] = etype
|
||||||
if "event_id" not in kwargs:
|
if "event_id" not in kwargs:
|
||||||
kwargs["event_id"] = self.create_event_id()
|
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:
|
if "origin_server_ts" not in kwargs:
|
||||||
kwargs["origin_server_ts"] = int(self.clock.time_msec())
|
kwargs["origin_server_ts"] = int(self.clock.time_msec())
|
||||||
|
Loading…
Reference in New Issue
Block a user