summary refs log tree commit diff
path: root/synapse/server.py
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <paul@matrix.org>2014-08-20 17:40:20 +0100
committerPaul "LeoNerd" Evans <paul@matrix.org>2014-08-27 11:45:16 +0100
commitd63f775e06f873236d560825e97c4b91163e8584 (patch)
treec222bd9e636ae1cd430b13988785bfbae0d4d3da /synapse/server.py
parentUse SQLite's PRAGMA user_version to check if the database file really matches... (diff)
downloadsynapse-d63f775e06f873236d560825e97c4b91163e8584.tar.xz
Added parse_roomid() helper
Diffstat (limited to '')
-rw-r--r--synapse/server.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/server.py b/synapse/server.py
index 439b9d628e..24f3a88103 100644
--- a/synapse/server.py
+++ b/synapse/server.py
@@ -126,6 +126,11 @@ class BaseHomeServer(object):
         object."""
         return UserID.from_string(s, hs=self)
 
+    def parse_roomid(self, s):
+        """Parse the string given by 's' as a Room ID and return a RoomID
+        object."""
+        return RoomID.from_string(s, hs=self)
+
     def parse_roomalias(self, s):
         """Parse the string given by 's' as a Room Alias and return a RoomAlias
         object."""