diff options
author | Erik Johnston <erik@matrix.org> | 2014-08-14 10:01:04 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-08-14 10:01:04 +0100 |
commit | 10294b60824347d73b01f7ce4add18467d1e6f0c (patch) | |
tree | 06d04a0a2e0ccf183bfc602ce9694d5958ed7a2e /synapse/server.py | |
parent | Make feedback table also store sender. (diff) | |
parent | grammar fix (diff) | |
download | synapse-10294b60824347d73b01f7ce4add18467d1e6f0c.tar.xz |
Merge branch 'master' of github.com:matrix-org/synapse into sql_refactor
Conflicts: synapse/storage/_base.py
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) |