diff options
author | Paul "LeoNerd" Evans <paul@matrix.org> | 2014-08-20 17:40:20 +0100 |
---|---|---|
committer | Paul "LeoNerd" Evans <paul@matrix.org> | 2014-08-27 11:45:16 +0100 |
commit | d63f775e06f873236d560825e97c4b91163e8584 (patch) | |
tree | c222bd9e636ae1cd430b13988785bfbae0d4d3da /synapse/server.py | |
parent | Use SQLite's PRAGMA user_version to check if the database file really matches... (diff) | |
download | synapse-d63f775e06f873236d560825e97c4b91163e8584.tar.xz |
Added parse_roomid() helper
Diffstat (limited to 'synapse/server.py')
-rw-r--r-- | synapse/server.py | 5 |
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.""" |