mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-08 23:52:41 -04:00
Add a HomeServer.parse_roomalias() to avoid having to RoomAlias.from_sring(..., hs=hs) - similar to parse_userid()
This commit is contained in:
parent
08ed4ccfdf
commit
7fb93f2a47
4 changed files with 18 additions and 14 deletions
|
@ -62,3 +62,9 @@ class RoomAliasTestCase(unittest.TestCase):
|
|||
room = RoomAlias("channel", "my.domain", True)
|
||||
|
||||
self.assertEquals(room.to_string(), "#channel:my.domain")
|
||||
|
||||
def test_via_homeserver(self):
|
||||
room = mock_homeserver.parse_roomalias("#elsewhere:my.domain")
|
||||
|
||||
self.assertEquals("elsewhere", room.localpart)
|
||||
self.assertEquals("my.domain", room.domain)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue