fix thinkos
This commit is contained in:
parent
8f646f2d04
commit
5b68f29f48
2 changed files with 7 additions and 7 deletions
|
@ -515,10 +515,10 @@ class RegistrationHandler(BaseHandler):
|
||||||
def _join_user_to_room(self, requester, room_identifier):
|
def _join_user_to_room(self, requester, room_identifier):
|
||||||
|
|
||||||
# try to create the room if we're the first user on the server
|
# try to create the room if we're the first user on the server
|
||||||
if self.config.autocreate_auto_join_rooms:
|
if self.hs.config.autocreate_auto_join_rooms:
|
||||||
count = yield self.store.count_all_users()
|
count = yield self.store.count_all_users()
|
||||||
if count == 1 and RoomAlias.is_valid(room_identifier):
|
if count == 1 and RoomAlias.is_valid(room_identifier):
|
||||||
room_creation_handler = hs.get_room_creation_handler()
|
room_creation_handler = self.hs.get_room_creation_handler()
|
||||||
info = yield room_creation_handler.create_room(
|
info = yield room_creation_handler.create_room(
|
||||||
requester,
|
requester,
|
||||||
config={
|
config={
|
||||||
|
@ -528,11 +528,11 @@ class RegistrationHandler(BaseHandler):
|
||||||
)
|
)
|
||||||
room_id = info["room_id"]
|
room_id = info["room_id"]
|
||||||
|
|
||||||
directory_handler = hs.get_handlers().directory_handler
|
directory_handler = self.hs.get_handlers().directory_handler
|
||||||
|
room_alias = RoomAlias.from_string(room_identifier)
|
||||||
yield directory_handler.create_association(
|
yield directory_handler.create_association(
|
||||||
self,
|
requester.user.to_string(),
|
||||||
requester.user,
|
room_alias,
|
||||||
room_identifier,
|
|
||||||
room_id
|
room_id
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,7 @@ class DirectoryWorkerStore(SQLBaseStore):
|
||||||
class DirectoryStore(DirectoryWorkerStore):
|
class DirectoryStore(DirectoryWorkerStore):
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def create_room_alias_association(self, room_alias, room_id, servers, creator=None):
|
def create_room_alias_association(self, room_alias, room_id, servers, creator=None):
|
||||||
""" Creates an associatin between a room alias and room_id/servers
|
""" Creates an association between a room alias and room_id/servers
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
room_alias (RoomAlias)
|
room_alias (RoomAlias)
|
||||||
|
|
Loading…
Reference in a new issue