@@ -130,11 +130,11 @@ async def on_POST(self, request: SynapseRequest) -> Tuple[int, JsonDict]:
130130 raise SynapseError (400 , "Email not found" , Codes .THREEPID_NOT_FOUND )
131131
132132 if self .config .email .threepid_behaviour_email == ThreepidBehaviour .REMOTE :
133- assert self .hs .config .account_threepid_delegate_email
133+ assert self .hs .config .registration . account_threepid_delegate_email
134134
135135 # Have the configured identity server handle the request
136136 ret = await self .identity_handler .requestEmailToken (
137- self .hs .config .account_threepid_delegate_email ,
137+ self .hs .config .registration . account_threepid_delegate_email ,
138138 email ,
139139 client_secret ,
140140 send_attempt ,
@@ -414,11 +414,11 @@ async def on_POST(self, request: SynapseRequest) -> Tuple[int, JsonDict]:
414414 raise SynapseError (400 , "Email is already in use" , Codes .THREEPID_IN_USE )
415415
416416 if self .config .email .threepid_behaviour_email == ThreepidBehaviour .REMOTE :
417- assert self .hs .config .account_threepid_delegate_email
417+ assert self .hs .config .registration . account_threepid_delegate_email
418418
419419 # Have the configured identity server handle the request
420420 ret = await self .identity_handler .requestEmailToken (
421- self .hs .config .account_threepid_delegate_email ,
421+ self .hs .config .registration . account_threepid_delegate_email ,
422422 email ,
423423 client_secret ,
424424 send_attempt ,
@@ -496,7 +496,7 @@ async def on_POST(self, request: SynapseRequest) -> Tuple[int, JsonDict]:
496496
497497 raise SynapseError (400 , "MSISDN is already in use" , Codes .THREEPID_IN_USE )
498498
499- if not self .hs .config .account_threepid_delegate_msisdn :
499+ if not self .hs .config .registration . account_threepid_delegate_msisdn :
500500 logger .warning (
501501 "No upstream msisdn account_threepid_delegate configured on the server to "
502502 "handle this request"
@@ -507,7 +507,7 @@ async def on_POST(self, request: SynapseRequest) -> Tuple[int, JsonDict]:
507507 )
508508
509509 ret = await self .identity_handler .requestMsisdnToken (
510- self .hs .config .account_threepid_delegate_msisdn ,
510+ self .hs .config .registration . account_threepid_delegate_msisdn ,
511511 country ,
512512 phone_number ,
513513 client_secret ,
@@ -604,7 +604,7 @@ def __init__(self, hs: "HomeServer"):
604604 self .identity_handler = hs .get_identity_handler ()
605605
606606 async def on_POST (self , request : Request ) -> Tuple [int , JsonDict ]:
607- if not self .config .account_threepid_delegate_msisdn :
607+ if not self .config .registration . account_threepid_delegate_msisdn :
608608 raise SynapseError (
609609 400 ,
610610 "This homeserver is not validating phone numbers. Use an identity server "
@@ -617,7 +617,7 @@ async def on_POST(self, request: Request) -> Tuple[int, JsonDict]:
617617
618618 # Proxy submit_token request to msisdn threepid delegate
619619 response = await self .identity_handler .proxy_msisdn_submit_token (
620- self .config .account_threepid_delegate_msisdn ,
620+ self .config .registration . account_threepid_delegate_msisdn ,
621621 body ["client_secret" ],
622622 body ["sid" ],
623623 body ["token" ],
@@ -644,7 +644,7 @@ async def on_GET(self, request: SynapseRequest) -> Tuple[int, JsonDict]:
644644 return 200 , {"threepids" : threepids }
645645
646646 async def on_POST (self , request : SynapseRequest ) -> Tuple [int , JsonDict ]:
647- if not self .hs .config .enable_3pid_changes :
647+ if not self .hs .config .registration . enable_3pid_changes :
648648 raise SynapseError (
649649 400 , "3PID changes are disabled on this server" , Codes .FORBIDDEN
650650 )
@@ -693,7 +693,7 @@ def __init__(self, hs: "HomeServer"):
693693
694694 @interactive_auth_handler
695695 async def on_POST (self , request : SynapseRequest ) -> Tuple [int , JsonDict ]:
696- if not self .hs .config .enable_3pid_changes :
696+ if not self .hs .config .registration . enable_3pid_changes :
697697 raise SynapseError (
698698 400 , "3PID changes are disabled on this server" , Codes .FORBIDDEN
699699 )
@@ -801,7 +801,7 @@ def __init__(self, hs: "HomeServer"):
801801 self .auth_handler = hs .get_auth_handler ()
802802
803803 async def on_POST (self , request : SynapseRequest ) -> Tuple [int , JsonDict ]:
804- if not self .hs .config .enable_3pid_changes :
804+ if not self .hs .config .registration . enable_3pid_changes :
805805 raise SynapseError (
806806 400 , "3PID changes are disabled on this server" , Codes .FORBIDDEN
807807 )
0 commit comments