mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 02:54:52 -04:00
Use the v2 Identity Service API for lookups (MSC2134 + MSC2140) (#5976)
This is a redo of https://github.com/matrix-org/synapse/pull/5897 but with `id_access_token` accepted. Implements [MSC2134](https://github.com/matrix-org/matrix-doc/pull/2134) plus Identity Service v2 authentication ala [MSC2140](https://github.com/matrix-org/matrix-doc/pull/2140). Identity lookup-related functions were also moved from `RoomMemberHandler` to `IdentityHandler`.
This commit is contained in:
parent
cbcbfe64a2
commit
9fc71dc5ee
6 changed files with 238 additions and 35 deletions
|
@ -579,8 +579,8 @@ class RoomCreationHandler(BaseHandler):
|
|||
|
||||
room_id = yield self._generate_room_id(creator_id=user_id, is_public=is_public)
|
||||
|
||||
directory_handler = self.hs.get_handlers().directory_handler
|
||||
if room_alias:
|
||||
directory_handler = self.hs.get_handlers().directory_handler
|
||||
yield directory_handler.create_association(
|
||||
requester=requester,
|
||||
room_id=room_id,
|
||||
|
@ -665,6 +665,7 @@ class RoomCreationHandler(BaseHandler):
|
|||
|
||||
for invite_3pid in invite_3pid_list:
|
||||
id_server = invite_3pid["id_server"]
|
||||
id_access_token = invite_3pid.get("id_access_token") # optional
|
||||
address = invite_3pid["address"]
|
||||
medium = invite_3pid["medium"]
|
||||
yield self.hs.get_room_member_handler().do_3pid_invite(
|
||||
|
@ -675,6 +676,7 @@ class RoomCreationHandler(BaseHandler):
|
|||
id_server,
|
||||
requester,
|
||||
txn_id=None,
|
||||
id_access_token=id_access_token,
|
||||
)
|
||||
|
||||
result = {"room_id": room_id}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue