diff options
author | Joas Schilling <coding@schilljs.com> | 2020-05-14 15:20:15 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-05-18 12:03:23 +0200 |
commit | d4ec6c04a0fa6f00480e94d0cfbab8d2c670cebf (patch) | |
tree | 1ab38570ef84ec78d855e5cd374f15c51f4086fd /lib/Settings | |
parent | 79ab18657d1cb6cac8931791c5009ecf83b23daf (diff) |
Don't allow multiple HPB without clustering and add a cache warning
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Settings')
-rw-r--r-- | lib/Settings/Admin/AdminSettings.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/Settings/Admin/AdminSettings.php b/lib/Settings/Admin/AdminSettings.php index 751c187aa..57196c6d0 100644 --- a/lib/Settings/Admin/AdminSettings.php +++ b/lib/Settings/Admin/AdminSettings.php @@ -29,6 +29,7 @@ use OCA\Talk\Participant; use OCA\Talk\Room; use OCA\Talk\Service\CommandService; use OCP\AppFramework\Http\TemplateResponse; +use OCP\ICacheFactory; use OCP\IConfig; use OCP\IInitialStateService; use OCP\Settings\ISettings; @@ -43,15 +44,19 @@ class AdminSettings implements ISettings { private $commandService; /** @var IInitialStateService */ private $initialStateService; + /** @var ICacheFactory */ + private $memcacheFactory; public function __construct(Config $talkConfig, IConfig $serverConfig, CommandService $commandService, - IInitialStateService $initialStateService) { + IInitialStateService $initialStateService, + ICacheFactory $memcacheFactory) { $this->talkConfig = $talkConfig; $this->serverConfig = $serverConfig; $this->commandService = $commandService; $this->initialStateService = $initialStateService; + $this->memcacheFactory = $memcacheFactory; } /** @@ -100,6 +105,8 @@ class AdminSettings implements ISettings { } protected function initSignalingServers(): void { + $this->initialStateService->provideInitialState('talk', 'has_cache_configured', $this->memcacheFactory->isAvailable()); + $this->initialStateService->provideInitialState('talk', 'signaling_mode', $this->talkConfig->getSignalingMode(false)); $this->initialStateService->provideInitialState('talk', 'signaling_servers', [ 'servers' => $this->talkConfig->getSignalingServers(), 'secret' => $this->talkConfig->getSignalingSecret(), |