diff options
Diffstat (limited to 'synapse/server.py')
-rw-r--r-- | synapse/server.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/synapse/server.py b/synapse/server.py index 0211972d05..96830a88b1 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 +from synapse.types import UserID, RoomAlias from synapse.util import Clock from synapse.util.distributor import Distributor from synapse.util.lockutils import LockManager @@ -120,6 +120,11 @@ class BaseHomeServer(object): object.""" return UserID.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.""" + return RoomAlias.from_string(s, hs=self) + # Build magic accessors for every dependency for depname in BaseHomeServer.DEPENDENCIES: BaseHomeServer._make_dependency_method(depname) |