File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
lib/Federation/Proxy/TalkV1 Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 1313use GuzzleHttp \Exception \ServerException ;
1414use OC \Http \Client \Response ;
1515use OCA \Talk \AppInfo \Application ;
16+ use OCA \Talk \Config as TalkConfig ;
1617use OCA \Talk \Exceptions \CannotReachRemoteException ;
1718use OCA \Talk \Exceptions \RemoteClientException ;
1819use OCA \Talk \Participant ;
@@ -33,6 +34,7 @@ public function __construct(
3334 protected LoggerInterface $ logger ,
3435 protected IFactory $ l10nFactory ,
3536 protected IUserSession $ userSession ,
37+ protected TalkConfig $ talkConfig ,
3638 ) {
3739 }
3840
@@ -119,6 +121,10 @@ protected function request(
119121 string $ url ,
120122 array $ parameters ,
121123 ): IResponse {
124+ if (!$ this ->talkConfig ->isFederationEnabled ()) {
125+ throw new CannotReachRemoteException ();
126+ }
127+
122128 $ requestOptions = $ this ->generateDefaultRequestOptions ($ cloudId , $ accessToken );
123129 if (!empty ($ parameters )) {
124130 $ requestOptions ['json ' ] = $ parameters ;
You can’t perform that action at this time.
0 commit comments