mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-01 07:16:05 -04:00
Refactor get_or_register_3pid_guest
This commit is contained in:
parent
d65ceb4b48
commit
8b3573a8b2
2 changed files with 25 additions and 11 deletions
|
@ -735,20 +735,16 @@ class RoomMemberHandler(object):
|
|||
}
|
||||
|
||||
if self.config.invite_3pid_guest:
|
||||
registration_handler = self.registration_handler
|
||||
guest_access_token = yield registration_handler.guest_access_token_for(
|
||||
rh = self.registration_handler
|
||||
guest_user_id, guest_access_token = yield rh.get_or_register_3pid_guest(
|
||||
medium=medium,
|
||||
address=address,
|
||||
inviter_user_id=inviter_user_id,
|
||||
)
|
||||
|
||||
guest_user_info = yield self.auth.get_user_by_access_token(
|
||||
guest_access_token
|
||||
)
|
||||
|
||||
invite_config.update({
|
||||
"guest_access_token": guest_access_token,
|
||||
"guest_user_id": guest_user_info["user"].to_string(),
|
||||
"guest_user_id": guest_user_id,
|
||||
})
|
||||
|
||||
data = yield self.simple_http_client.post_urlencoded_get_json(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue