mirror of https://github.com/sualko/cloud_bbb
parent
9e3a320a65
commit
c39ab49e76
|
@ -16,6 +16,7 @@ use \OCA\BigBlueButton\Listener\UserDeletedListener;
|
||||||
use \OCA\BigBlueButton\Middleware\HookMiddleware;
|
use \OCA\BigBlueButton\Middleware\HookMiddleware;
|
||||||
use \OCA\BigBlueButton\Middleware\JoinMiddleware;
|
use \OCA\BigBlueButton\Middleware\JoinMiddleware;
|
||||||
use \OCP\AppFramework\App;
|
use \OCP\AppFramework\App;
|
||||||
|
use \OCP\AppFramework\QueryException;
|
||||||
use \OCP\EventDispatcher\IEventDispatcher;
|
use \OCP\EventDispatcher\IEventDispatcher;
|
||||||
use \OCP\IConfig;
|
use \OCP\IConfig;
|
||||||
use \OCP\Settings\IManager as ISettingsManager;
|
use \OCP\Settings\IManager as ISettingsManager;
|
||||||
|
@ -52,8 +53,20 @@ class Application extends App {
|
||||||
}
|
}
|
||||||
|
|
||||||
private function registerAsPersonalSetting(): void {
|
private function registerAsPersonalSetting(): void {
|
||||||
/** @var ISettingsManager */
|
try {
|
||||||
$settingsManager = $this->getContainer()->query(ISettingsManager::class);
|
/** @var ISettingsManager */
|
||||||
|
$settingsManager = $this->getContainer()->query(ISettingsManager::class);
|
||||||
|
} catch (QueryException $exception) {
|
||||||
|
// Workaround for Nextcloud 19
|
||||||
|
$server = $this->getContainer()->getServer();
|
||||||
|
|
||||||
|
if (method_exists($server, 'getSettingsManager')) {
|
||||||
|
$settingsManager = $server->getSettingsManager();
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$settingsManager->registerSetting(ISettingsManager::KEY_PERSONAL_SETTINGS, \OCA\BigBlueButton\Settings\Personal::class);
|
$settingsManager->registerSetting(ISettingsManager::KEY_PERSONAL_SETTINGS, \OCA\BigBlueButton\Settings\Personal::class);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue