01acfa3b40
Type checking / changes (push) Has been cancelled
Type checking / test (push) Has been cancelled
Type checking / typescript-summary (push) Has been cancelled
Node tests / changes (push) Has been cancelled
Node tests / test (push) Has been cancelled
Node tests / test-summary (push) Has been cancelled
Источник: https://github.com/nextcloud/spreed/archive/refs/tags/v22.0.12.tar.gz С этого коммита ветка официального Nextcloud Talk отрезана (решение владельца 2026-07-06). Все дальнейшие изменения — только наши; версии релизов: 22.0.12-f7.N.
52 lines
1.2 KiB
PHP
52 lines
1.2 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
/**
|
|
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
|
|
namespace OCA\Talk\SetupCheck;
|
|
|
|
use OC\Memcache\NullCache;
|
|
use OCA\Talk\Config;
|
|
use OCP\ICacheFactory;
|
|
use OCP\IL10N;
|
|
use OCP\IURLGenerator;
|
|
use OCP\SetupCheck\ISetupCheck;
|
|
use OCP\SetupCheck\SetupResult;
|
|
|
|
class FederationLockCache implements ISetupCheck {
|
|
public function __construct(
|
|
protected readonly Config $talkConfig,
|
|
protected readonly ICacheFactory $cacheFactory,
|
|
protected readonly IURLGenerator $urlGenerator,
|
|
protected readonly IL10N $l,
|
|
) {
|
|
}
|
|
|
|
#[\Override]
|
|
public function getCategory(): string {
|
|
return 'talk';
|
|
}
|
|
|
|
#[\Override]
|
|
public function getName(): string {
|
|
return $this->l->t('Federation');
|
|
}
|
|
|
|
#[\Override]
|
|
public function run(): SetupResult {
|
|
if (!$this->talkConfig->isFederationEnabled()) {
|
|
return SetupResult::success();
|
|
}
|
|
if (!$this->cacheFactory->createLocking('talkroom_') instanceof NullCache) {
|
|
return SetupResult::success();
|
|
}
|
|
return SetupResult::warning(
|
|
$this->l->t('It is highly recommended to configure "memcache.locking" when Talk Federation is enabled.'),
|
|
$this->urlGenerator->linkToDocs('admin-cache'),
|
|
);
|
|
}
|
|
}
|