mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 02:54:52 -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
|
@ -22,7 +22,6 @@ from synapse.api.events.room import (RoomTopicEvent, MessageEvent,
|
|||
RoomMemberEvent, FeedbackEvent)
|
||||
from synapse.api.constants import Feedback, Membership
|
||||
from synapse.api.streams import PaginationConfig
|
||||
from synapse.types import RoomAlias
|
||||
|
||||
import json
|
||||
import logging
|
||||
|
@ -150,10 +149,7 @@ class JoinRoomAliasServlet(RestServlet):
|
|||
|
||||
logger.debug("room_alias: %s", room_alias)
|
||||
|
||||
room_alias = RoomAlias.from_string(
|
||||
urllib.unquote(room_alias),
|
||||
self.hs
|
||||
)
|
||||
room_alias = self.hs.parse_roomalias(urllib.unquote(room_alias))
|
||||
|
||||
handler = self.handlers.room_member_handler
|
||||
ret_dict = yield handler.join_room_alias(user, room_alias)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue