diff --git a/lib/Settings/Admin/AdminSettings.php b/lib/Settings/Admin/AdminSettings.php index 6039bfa842e7..619c984538cd 100644 --- a/lib/Settings/Admin/AdminSettings.php +++ b/lib/Settings/Admin/AdminSettings.php @@ -25,6 +25,7 @@ use OCP\IUserSession; use OCP\L10N\IFactory; use OCP\Settings\ISettings; +use OCP\Support\Subscription\IRegistry; use OCP\Util; class AdminSettings implements ISettings { @@ -38,6 +39,7 @@ public function __construct( private ICacheFactory $memcacheFactory, private IGroupManager $groupManager, private MatterbridgeManager $bridgeManager, + private IRegistry $subscription, IUserSession $userSession, private IL10N $l10n, private IFactory $l10nFactory, @@ -126,6 +128,7 @@ protected function initTurnServers(): void { } protected function initSignalingServers(): void { + $this->initialState->provideInitialState('has_valid_subscription', $this->subscription->delegateHasValidSubscription()); $this->initialState->provideInitialState('has_cache_configured', $this->memcacheFactory->isAvailable()); $this->initialState->provideInitialState('signaling_mode', $this->talkConfig->getSignalingMode(false)); $this->initialState->provideInitialState('signaling_servers', [ diff --git a/lib/SetupCheck/HighPerformanceBackend.php b/lib/SetupCheck/HighPerformanceBackend.php index 28de6e56cd26..d86334bc22db 100644 --- a/lib/SetupCheck/HighPerformanceBackend.php +++ b/lib/SetupCheck/HighPerformanceBackend.php @@ -16,6 +16,7 @@ use OCP\IURLGenerator; use OCP\SetupCheck\ISetupCheck; use OCP\SetupCheck\SetupResult; +use OCP\Support\Subscription\IRegistry; class HighPerformanceBackend implements ISetupCheck { public function __construct( @@ -24,6 +25,7 @@ public function __construct( readonly protected IURLGenerator $urlGenerator, readonly protected IL10N $l, readonly protected Manager $signalManager, + readonly protected IRegistry $subscription, ) { } @@ -39,11 +41,16 @@ public function run(): SetupResult { if ($this->talkConfig->getSignalingMode() === Config::SIGNALING_INTERNAL) { $setupResult = SetupResult::error(...); if ($this->talkConfig->getHideSignalingWarning()) { - $setupResult = SetupResult::warning(...); + $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.'), - 'https://portal.nextcloud.com/article/Nextcloud-Talk/High-Performance-Backend/Installation-of-Nextcloud-Talk-High-Performance-Backend', + $documentation, ); } diff --git a/lib/SetupCheck/RecordingBackend.php b/lib/SetupCheck/RecordingBackend.php index 3a4262cfa1ad..b4ab15c97508 100644 --- a/lib/SetupCheck/RecordingBackend.php +++ b/lib/SetupCheck/RecordingBackend.php @@ -25,16 +25,20 @@ public function getCategory(): string { } public function getName(): string { - return $this->l->t('Recording backend'); + $name = $this->l->t('Recording backend'); + if ($this->talkConfig->getSignalingMode() === Config::SIGNALING_INTERNAL) { + return '[skip] ' . $name; + } + return $name; } public function run(): SetupResult { - if ($this->talkConfig->getSignalingMode() !== Config::SIGNALING_INTERNAL) { - return SetupResult::success(); + 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::error($this->l->t('Using the recording backend requires a High-performance backend.')); + return SetupResult::success(); } } diff --git a/lib/SetupCheck/SIPConfiguration.php b/lib/SetupCheck/SIPConfiguration.php index a3dbe3f2cacd..e595541cccb4 100644 --- a/lib/SetupCheck/SIPConfiguration.php +++ b/lib/SetupCheck/SIPConfiguration.php @@ -25,16 +25,20 @@ public function getCategory(): string { } public function getName(): string { - return $this->l->t('SIP dial-in'); + $name = $this->l->t('SIP configuration'); + if ($this->talkConfig->getSignalingMode() === Config::SIGNALING_INTERNAL) { + return '[skip] ' . $name; + } + return $name; } public function run(): SetupResult { - if ($this->talkConfig->getSignalingMode() !== Config::SIGNALING_INTERNAL) { - return SetupResult::success(); + if ($this->talkConfig->getSignalingMode() === Config::SIGNALING_INTERNAL) { + return SetupResult::success($this->l->t('Using the SIP functionality requires a High-performance backend.')); } if ($this->talkConfig->getSIPSharedSecret() === '' && $this->talkConfig->getDialInInfo() === '') { return SetupResult::info($this->l->t('No SIP backend configured')); } - return SetupResult::error($this->l->t('Using the SIP functionality requires a High-performance backend.')); + return SetupResult::success(); } } diff --git a/src/components/AdminSettings/SignalingServers.vue b/src/components/AdminSettings/SignalingServers.vue index 10b4a5873717..149fb7e7af35 100644 --- a/src/components/AdminSettings/SignalingServers.vue +++ b/src/components/AdminSettings/SignalingServers.vue @@ -6,9 +6,24 @@