UPSTREAM BASELINE: nextcloud/spreed v22.0.12 (без изменений)
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
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.
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
<?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 OCP\Http\Client\IClientService;
|
||||
use OCP\IConfig;
|
||||
use OCP\IL10N;
|
||||
use OCP\IURLGenerator;
|
||||
use OCP\SetupCheck\CheckServerResponseTrait;
|
||||
use OCP\SetupCheck\ISetupCheck;
|
||||
use OCP\SetupCheck\SetupResult;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
/**
|
||||
* Check whether the WASM URLs works
|
||||
*/
|
||||
class BackgroundBlurLoading implements ISetupCheck {
|
||||
use CheckServerResponseTrait;
|
||||
|
||||
public function __construct(
|
||||
protected IL10N $l10n,
|
||||
protected IConfig $config,
|
||||
protected IURLGenerator $urlGenerator,
|
||||
protected IClientService $clientService,
|
||||
protected LoggerInterface $logger,
|
||||
) {
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getCategory(): string {
|
||||
return 'talk';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getName(): string {
|
||||
return $this->l10n->t('Background blur');
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function run(): SetupResult {
|
||||
$url = $this->urlGenerator->linkTo('spreed', 'js/vision_wasm_internal.wasm');
|
||||
$noResponse = true;
|
||||
$responses = $this->runRequest('HEAD', $url);
|
||||
foreach ($responses as $response) {
|
||||
$noResponse = false;
|
||||
if ($response->getStatusCode() === 200) {
|
||||
return SetupResult::success();
|
||||
}
|
||||
}
|
||||
|
||||
if ($noResponse) {
|
||||
return SetupResult::info(
|
||||
$this->l10n->t('Could not check for WASM loading support. Please check manually if your web server serves `.wasm` files.') . "\n" . $this->serverConfigHelp(),
|
||||
$this->urlGenerator->linkToDocs('admin-nginx'),
|
||||
);
|
||||
}
|
||||
return SetupResult::warning(
|
||||
$this->l10n->t('Your web server is not properly set up to deliver `.wasm` files. This is typically an issue with the Nginx configuration. For background blur it needs an adjustment to also deliver `.wasm` files. Compare your Nginx configuration to the recommended configuration in our documentation.'),
|
||||
$this->urlGenerator->linkToDocs('admin-nginx'),
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
<?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 OCP\AppFramework\Services\IAppConfig;
|
||||
use OCP\IConfig;
|
||||
use OCP\IL10N;
|
||||
use OCP\SetupCheck\ISetupCheck;
|
||||
use OCP\SetupCheck\SetupResult;
|
||||
|
||||
/**
|
||||
* Check app configs and their dependencies
|
||||
*/
|
||||
class Configuration implements ISetupCheck {
|
||||
public function __construct(
|
||||
protected IL10N $l10n,
|
||||
protected IConfig $config,
|
||||
protected IAppConfig $appConfig,
|
||||
) {
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getCategory(): string {
|
||||
return 'talk';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getName(): string {
|
||||
return $this->l10n->t('Talk configuration values');
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function run(): SetupResult {
|
||||
$errors = $warnings = [];
|
||||
$maxCallDuration = $this->appConfig->getAppValueInt('max_call_duration');
|
||||
if ($maxCallDuration > 0) {
|
||||
if ($this->config->getAppValue('core', 'backgroundjobs_mode', 'ajax') !== 'cron') {
|
||||
$errors[] = $this->l10n->t('Forcing a call duration is only supported with system cron. Please enable system cron or remove the `max_call_duration` configuration.');
|
||||
} elseif ($maxCallDuration < 3600) {
|
||||
$warnings[] = $this->l10n->t('Small `max_call_duration` values (currently set to %d) are not enforceable due to technical limitations. The background job is only executed every 5 minutes, so use at own risk.', [$maxCallDuration]);
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($errors)) {
|
||||
return SetupResult::error(implode("\n", $errors));
|
||||
}
|
||||
if (!empty($warnings)) {
|
||||
return SetupResult::warning(implode("\n", $warnings));
|
||||
}
|
||||
return SetupResult::success();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
<?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'),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,145 @@
|
||||
<?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 OCA\Talk\Config;
|
||||
use OCA\Talk\Signaling\Manager;
|
||||
use OCP\AppFramework\Http;
|
||||
use OCP\ICacheFactory;
|
||||
use OCP\IL10N;
|
||||
use OCP\IURLGenerator;
|
||||
use OCP\SetupCheck\ISetupCheck;
|
||||
use OCP\SetupCheck\SetupResult;
|
||||
use OCP\Support\Subscription\IRegistry;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class HighPerformanceBackend implements ISetupCheck {
|
||||
public function __construct(
|
||||
protected readonly Config $talkConfig,
|
||||
protected readonly ICacheFactory $cacheFactory,
|
||||
protected readonly IURLGenerator $urlGenerator,
|
||||
protected readonly IL10N $l,
|
||||
protected readonly Manager $signalManager,
|
||||
protected readonly IRegistry $subscription,
|
||||
protected readonly LoggerInterface $logger,
|
||||
) {
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getCategory(): string {
|
||||
return 'talk';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getName(): string {
|
||||
return $this->l->t('High-performance backend');
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function run(): SetupResult {
|
||||
if ($this->talkConfig->getSignalingMode() === Config::SIGNALING_INTERNAL) {
|
||||
$setupResult = SetupResult::error(...);
|
||||
if ($this->talkConfig->getHideSignalingWarning()) {
|
||||
$setupResult = SetupResult::info(...);
|
||||
}
|
||||
$documentation = 'https://nextcloud-talk.readthedocs.io/en/latest/quick-install/';
|
||||
if ($this->subscription->delegateHasValidSubscription()) {
|
||||
$documentation = 'https://portal.nextcloud.com/article/Nextcloud-Talk/High-Performance-Backend/Installation-of-Nextcloud-Talk-High-Performance-Backend';
|
||||
}
|
||||
|
||||
return $setupResult(
|
||||
$this->l->t('No High-performance backend configured - Running Nextcloud Talk without the High-performance backend only scales for very small calls (max. 2-3 participants). Please set up the High-performance backend to ensure calls with multiple participants work seamlessly.'),
|
||||
$documentation,
|
||||
);
|
||||
}
|
||||
|
||||
if ($this->talkConfig->getSignalingMode() === Config::SIGNALING_CLUSTER_CONVERSATION) {
|
||||
return SetupResult::warning(
|
||||
$this->l->t('Running the High-performance backend "conversation_cluster" mode is deprecated and will no longer be supported in the upcoming version. The High-performance backend supports real clustering nowadays which should be used instead.'),
|
||||
'https://portal.nextcloud.com/article/Partner-Products/Talk-High-Performance-Backend/Nextcloud-Talk-High-Performance-Back-End-Requirements#content-clustering-and-use-of-multiple-hpbs',
|
||||
);
|
||||
}
|
||||
|
||||
if (count($this->talkConfig->getSignalingServers()) > 1) {
|
||||
return SetupResult::warning(
|
||||
$this->l->t('Defining multiple High-performance backends is deprecated and will no longer be supported in the upcoming version. Instead a load-balancer should be set up together with clustered signaling servers and configured in the Talk settings.'),
|
||||
'https://portal.nextcloud.com/article/Partner-Products/Talk-High-Performance-Backend/Nextcloud-Talk-High-Performance-Back-End-Requirements#content-clustering-and-use-of-multiple-hpbs',
|
||||
);
|
||||
}
|
||||
|
||||
// Verify stored signaling key pair
|
||||
try {
|
||||
$alg = $this->talkConfig->getSignalingTokenAlgorithm();
|
||||
$privateKey = $this->talkConfig->getSignalingTokenPrivateKey();
|
||||
$publicKey = $this->talkConfig->getSignalingTokenPublicKey();
|
||||
$publicKeyDerived = $this->talkConfig->deriveSignalingTokenPublicKey($privateKey, $alg);
|
||||
|
||||
if ($publicKey !== $publicKeyDerived) {
|
||||
return SetupResult::error($this->l->t('The stored public key for used algorithm %1$s does not match the stored private key. Run %2$s to fix the issue.', [$alg, '`occ talk:signaling:verify-keys --update`']));
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
$this->logger->error('An error occurred while verifying the public key of the signaling token', ['exception' => $e]);
|
||||
return SetupResult::error($this->l->t('High-performance backend not configured correctly. Run %s for details.', ['`occ talk:signaling:verify-keys`']));
|
||||
}
|
||||
|
||||
try {
|
||||
$testResult = $this->signalManager->checkServerCompatibility(0);
|
||||
} catch (\OutOfBoundsException) {
|
||||
return SetupResult::error($this->l->t('High-performance backend not configured correctly'));
|
||||
}
|
||||
if ($testResult['status'] === Http::STATUS_INTERNAL_SERVER_ERROR) {
|
||||
$error = $testResult['data']['error'];
|
||||
if ($error === 'CAN_NOT_CONNECT') {
|
||||
return SetupResult::error($this->l->t('Error: Cannot connect to server'));
|
||||
}
|
||||
if ($error === 'JSON_INVALID') {
|
||||
return SetupResult::error($this->l->t('Error: Server did not respond with proper JSON'));
|
||||
}
|
||||
if ($error === 'CERTIFICATE_EXPIRED') {
|
||||
return SetupResult::error($this->l->t('Error: Certificate expired'));
|
||||
}
|
||||
if ($error === 'TIME_OUT_OF_SYNC') {
|
||||
return SetupResult::error($this->l->t('Error: System times of Nextcloud server and High-performance backend server are out of sync. Please make sure that both servers are connected to a time-server or manually synchronize their time.'));
|
||||
}
|
||||
if ($error === 'UPDATE_REQUIRED') {
|
||||
$version = $testResult['data']['version'] ?? $this->l->t('Could not get version');
|
||||
return SetupResult::error(str_replace(
|
||||
'{version}',
|
||||
$version,
|
||||
$this->l->t('Error: Running version: {version}; Server needs to be updated to be compatible with this version of Talk'),
|
||||
));
|
||||
}
|
||||
if ($error) {
|
||||
return SetupResult::error(str_replace('{error}', $error, $this->l->t('Error: Server responded with: {error}')));
|
||||
}
|
||||
return SetupResult::error($this->l->t('Error: Unknown error occurred'));
|
||||
}
|
||||
if ($testResult['status'] === Http::STATUS_OK
|
||||
&& isset($testResult['data']['warning'])
|
||||
&& $testResult['data']['warning'] === 'UPDATE_OPTIONAL'
|
||||
) {
|
||||
$version = $testResult['data']['version'] ?? $this->l->t('Could not get version');
|
||||
$features = implode(', ', $testResult['data']['features'] ?? []);
|
||||
return SetupResult::warning(str_replace(
|
||||
['{version}', '{features}'],
|
||||
[$version, $features],
|
||||
$this->l->t('Warning: Running version: {version}; Server does not support all features of this Talk version, missing features: {features}')
|
||||
));
|
||||
}
|
||||
|
||||
if (!$this->cacheFactory->isAvailable()) {
|
||||
return SetupResult::warning(
|
||||
$this->l->t('It is highly recommended to configure a memory cache when running Nextcloud Talk with a High-performance backend.'),
|
||||
$this->urlGenerator->linkToDocs('admin-cache'),
|
||||
);
|
||||
}
|
||||
|
||||
return SetupResult::success();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace OCA\Talk\SetupCheck;
|
||||
|
||||
use OCP\App\IAppManager;
|
||||
use OCP\IL10N;
|
||||
use OCP\SetupCheck\ISetupCheck;
|
||||
use OCP\SetupCheck\SetupResult;
|
||||
|
||||
class NotifyPush implements ISetupCheck {
|
||||
|
||||
public function __construct(
|
||||
protected IL10N $l10n,
|
||||
protected IAppManager $appManager,
|
||||
) {
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getName(): string {
|
||||
return $this->l10n->t('Client Push'); // TRANSLATORS: this is the app name of the notify_push app.
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getCategory(): string {
|
||||
return 'talk';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function run(): SetupResult {
|
||||
if ($this->appManager->isEnabledForAnyone('notify_push')) {
|
||||
return SetupResult::success(
|
||||
$this->l10n->t('Client Push is installed, this improves the performance of desktop clients.')
|
||||
);
|
||||
}
|
||||
|
||||
return SetupResult::warning(
|
||||
$this->l10n->t('{notify_push} is not installed, this might lead to performance issues when using desktop clients.'),
|
||||
'https://github.com/nextcloud/notify_push/blob/main/README.md',
|
||||
[
|
||||
'notify_push' => [
|
||||
'id' => 'notify_push',
|
||||
'name' => $this->getName(),
|
||||
'type' => 'app',
|
||||
],
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
<?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 OCA\Talk\Config;
|
||||
use OCP\IL10N;
|
||||
use OCP\SetupCheck\ISetupCheck;
|
||||
use OCP\SetupCheck\SetupResult;
|
||||
|
||||
class RecordingBackend implements ISetupCheck {
|
||||
public function __construct(
|
||||
protected readonly Config $talkConfig,
|
||||
protected readonly IL10N $l,
|
||||
) {
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getCategory(): string {
|
||||
return 'talk';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getName(): string {
|
||||
$name = $this->l->t('Recording backend');
|
||||
if ($this->talkConfig->getSignalingMode() === Config::SIGNALING_INTERNAL) {
|
||||
return '[skip] ' . $name;
|
||||
}
|
||||
return $name;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function run(): SetupResult {
|
||||
if ($this->talkConfig->getSignalingMode() === Config::SIGNALING_INTERNAL) {
|
||||
return SetupResult::success($this->l->t('Using the recording backend requires a High-performance backend.'));
|
||||
}
|
||||
if (empty($this->talkConfig->getRecordingServers())) {
|
||||
return SetupResult::info($this->l->t('No recording backend configured'));
|
||||
}
|
||||
return SetupResult::success();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
<?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 OCA\Talk\Config;
|
||||
use OCP\IDBConnection;
|
||||
use OCP\IL10N;
|
||||
use OCP\SetupCheck\ISetupCheck;
|
||||
use OCP\SetupCheck\SetupResult;
|
||||
|
||||
class SIPConfiguration implements ISetupCheck {
|
||||
public function __construct(
|
||||
protected readonly Config $talkConfig,
|
||||
protected readonly IDBConnection $connection,
|
||||
protected readonly IL10N $l,
|
||||
) {
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getCategory(): string {
|
||||
return 'talk';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getName(): string {
|
||||
$name = $this->l->t('SIP configuration');
|
||||
if ($this->talkConfig->getSignalingMode() === Config::SIGNALING_INTERNAL) {
|
||||
return '[skip] ' . $name;
|
||||
}
|
||||
return $name;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function run(): SetupResult {
|
||||
if ($this->talkConfig->getSignalingMode() === Config::SIGNALING_INTERNAL) {
|
||||
return SetupResult::success($this->l->t('Using the SIP functionality requires a High-performance backend.'));
|
||||
}
|
||||
|
||||
$query = $this->connection->getQueryBuilder();
|
||||
$query->select('phone_number')
|
||||
->from('talk_phone_numbers')
|
||||
->where($query->expr()->like('phone_number', $query->createNamedParameter(
|
||||
$this->connection->escapeLikeParameter('+') . '%'
|
||||
)))
|
||||
->orWhere($query->expr()->like('phone_number', $query->createNamedParameter(
|
||||
$this->connection->escapeLikeParameter('0') . '%'
|
||||
)));
|
||||
|
||||
$result = $query->executeQuery();
|
||||
$invalidNumbers = $result->fetchAll(\PDO::FETCH_COLUMN);
|
||||
$result->closeCursor();
|
||||
|
||||
if (!empty($invalidNumbers)) {
|
||||
$message = $this->l->t("Assigned Talk phone numbers must not start with + or 0. Please remove or update the following numbers:\n{list}");
|
||||
$message = str_replace(
|
||||
'{list}',
|
||||
implode("\n", $invalidNumbers),
|
||||
$message
|
||||
);
|
||||
return SetupResult::error($message, 'https://portal.nextcloud.com/article/Nextcloud-Talk/Nextcloud-Talk-Phone/Direct-Dial-in#content-provisioning');
|
||||
}
|
||||
|
||||
if ($this->talkConfig->getSIPSharedSecret() === '' && $this->talkConfig->getDialInInfo() === '') {
|
||||
return SetupResult::info($this->l->t('No SIP backend configured'));
|
||||
}
|
||||
|
||||
return SetupResult::success();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user