summary refs log tree commit diff
path: root/synapse/server.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-10-30 17:00:11 +0000
committerErik Johnston <erik@matrix.org>2014-10-30 17:00:11 +0000
commit12ce441e67a40bb73ac5aca0283c2fe4afac4021 (patch)
tree0a4b6d32dc2a7f149153ad7868d5c5e117335859 /synapse/server.py
parentMake federation return the old current state, so that we can use it to do auth (diff)
downloadsynapse-12ce441e67a40bb73ac5aca0283c2fe4afac4021.tar.xz
Convert event ids to be of the form :example.com
Diffstat (limited to 'synapse/server.py')
-rw-r--r--synapse/server.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/synapse/server.py b/synapse/server.py
index a4d2d4aba5..d770b20b19 100644
--- a/synapse/server.py
+++ b/synapse/server.py
@@ -28,7 +28,7 @@ from synapse.handlers import Handlers
 from synapse.rest import RestServletFactory
 from synapse.state import StateHandler
 from synapse.storage import DataStore
-from synapse.types import UserID, RoomAlias, RoomID
+from synapse.types import UserID, RoomAlias, RoomID, EventID
 from synapse.util import Clock
 from synapse.util.distributor import Distributor
 from synapse.util.lockutils import LockManager
@@ -143,6 +143,11 @@ class BaseHomeServer(object):
         object."""
         return RoomID.from_string(s, hs=self)
 
+    def parse_eventid(self, s):
+        """Parse the string given by 's' as a Event ID and return a EventID
+        object."""
+        return EventID.from_string(s, hs=self)
+
     def serialize_event(self, e):
         return serialize_event(self, e)