Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorVitor Mattos <vitor@php.rio>2021-12-06 22:53:15 +0300
committerVitor Mattos <vitor@php.rio>2021-12-06 22:53:15 +0300
commitd4f6ff8123e0eea1dc6c01f45538890dd672c812 (patch)
treefa0cf62d5efb2d8ea0f5b93df3726c6fd32d3e82 /lib
parent7b36db07a31bbf6821551f95dff317923c9e0770 (diff)
Reduce DeprecatedMethod
Signed-off-by: Vitor Mattos <vitor@php.rio>
Diffstat (limited to 'lib')
-rw-r--r--lib/Federation/CloudFederationProviderTalk.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/Federation/CloudFederationProviderTalk.php b/lib/Federation/CloudFederationProviderTalk.php
index 7fa2b5ddc..a2fa48b62 100644
--- a/lib/Federation/CloudFederationProviderTalk.php
+++ b/lib/Federation/CloudFederationProviderTalk.php
@@ -28,6 +28,7 @@ namespace OCA\Talk\Federation;
use Exception;
use OCA\FederatedFileSharing\AddressHandler;
use OCA\Talk\AppInfo\Application;
+use OCA\Talk\Config;
use OCA\Talk\Manager;
use OCA\Talk\Model\Attendee;
use OCA\Talk\Model\AttendeeMapper;
@@ -60,6 +61,9 @@ class CloudFederationProviderTalk implements ICloudFederationProvider {
/** @var FederationManager */
private $federationManager;
+ /** @var Config */
+ private $config;
+
/** @var INotificationManager */
private $notificationManager;
@@ -79,6 +83,7 @@ class CloudFederationProviderTalk implements ICloudFederationProvider {
IUserManager $userManager,
AddressHandler $addressHandler,
FederationManager $federationManager,
+ Config $config,
INotificationManager $notificationManager,
IURLGenerator $urlGenerator,
ParticipantService $participantService,
@@ -88,6 +93,7 @@ class CloudFederationProviderTalk implements ICloudFederationProvider {
$this->userManager = $userManager;
$this->addressHandler = $addressHandler;
$this->federationManager = $federationManager;
+ $this->config = $config;
$this->notificationManager = $notificationManager;
$this->urlGenerator = $urlGenerator;
$this->participantService = $participantService;
@@ -108,7 +114,7 @@ class CloudFederationProviderTalk implements ICloudFederationProvider {
* @throws DBException
*/
public function shareReceived(ICloudFederationShare $share): string {
- if (!$this->federationManager->isEnabled()) {
+ if (!$this->config->isFederationEnabled()) {
throw new ProviderCouldNotAddShareException('Server does not support talk federation', '', Http::STATUS_SERVICE_UNAVAILABLE);
}
if (!in_array($share->getShareType(), $this->getSupportedShareTypes(), true)) {
@@ -232,7 +238,7 @@ class CloudFederationProviderTalk implements ICloudFederationProvider {
* @throws ShareNotFound
*/
private function getAttendeeAndValidate(int $id, string $sharedSecret): Attendee {
- if (!$this->federationManager->isEnabled()) {
+ if (!$this->config->isFederationEnabled()) {
throw new ActionNotSupportedException('Server does not support Talk federation');
}