summary refs log tree commit diff
path: root/synapse/api
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/api')
-rw-r--r--synapse/api/events/factory.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/api/events/factory.py b/synapse/api/events/factory.py

index a3b293e024..5e38cdbc44 100644 --- a/synapse/api/events/factory.py +++ b/synapse/api/events/factory.py
@@ -47,11 +47,14 @@ class EventFactory(object): self._event_list[event_class.TYPE] = event_class self.clock = hs.get_clock() + self.hs = hs def create_event(self, etype=None, **kwargs): kwargs["type"] = etype if "event_id" not in kwargs: - kwargs["event_id"] = random_string(10) + kwargs["event_id"] = "%s@%s" % ( + random_string(10), self.hs.hostname + ) if "ts" not in kwargs: kwargs["ts"] = int(self.clock.time_msec())