From d63f775e06f873236d560825e97c4b91163e8584 Mon Sep 17 00:00:00 2001 From: "Paul \"LeoNerd\" Evans" Date: Wed, 20 Aug 2014 17:40:20 +0100 Subject: Added parse_roomid() helper --- synapse/server.py | 5 +++++ 1 file changed, 5 insertions(+) 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.""" -- cgit 1.4.1