summary refs log tree commit diff
path: root/synapse/api/events/factory.py
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/api/events/factory.py')
-rw-r--r--synapse/api/events/factory.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/api/events/factory.py b/synapse/api/events/factory.py
index 06f3bf232b..750096c618 100644
--- a/synapse/api/events/factory.py
+++ b/synapse/api/events/factory.py
@@ -21,6 +21,8 @@ from synapse.api.events.room import (
     RoomRedactionEvent,
 )
 
+from synapse.types import EventID
+
 from synapse.util.stringutils import random_string
 
 
@@ -59,7 +61,9 @@ class EventFactory(object):
 
         local_part = str(int(self.clock.time())) + i + random_string(5)
 
-        return "%s@%s" % (local_part, self.hs.hostname)
+        e_id = EventID.create_local(local_part, self.hs)
+
+        return e_id.to_string()
 
     def create_event(self, etype=None, **kwargs):
         kwargs["type"] = etype