Added parse_roomid() helper

pull/4/merge
Paul "LeoNerd" Evans 11 years ago
parent e677a3114e
commit d63f775e06
  1. 5
      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."""

Loading…
Cancel
Save