File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
packages/federation-sdk/src/services Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,11 @@ export class FederationValidationService {
6262 }
6363
6464 private async checkDomainReachable ( domain : string ) : Promise < void > {
65+ // Early return for same-server domain - no need to check reachability
66+ if ( domain === this . configService . serverName ) {
67+ return ;
68+ }
69+
6570 const timeoutMs =
6671 this . configService . getConfig ( 'networkCheckTimeoutMs' ) || 5000 ;
6772
Original file line number Diff line number Diff line change @@ -96,11 +96,6 @@ export class InviteService {
9696 ) ;
9797 }
9898
99- await this . federationValidationService . validateOutboundInvite (
100- userId ,
101- roomId ,
102- ) ;
103-
10499 // if user invited belongs to our server
105100 if ( invitedServer === this . configService . serverName ) {
106101 await stateService . handlePdu ( inviteEvent ) ;
@@ -119,6 +114,11 @@ export class InviteService {
119114 } ;
120115 }
121116
117+ await this . federationValidationService . validateOutboundInvite (
118+ userId ,
119+ roomId ,
120+ ) ;
121+
122122 // get signed invite event
123123 const inviteResponse = await federationService . inviteUser (
124124 inviteEvent ,
You can’t perform that action at this time.
0 commit comments