Fix "enable_matterbridge" initial state not set for guests

The RightSidebar component always checks the value, so even if the
setting does not apply for guests it should be explicitly disabled in
that case.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Daniel Calviño Sánchez 2020-09-17 13:07:36 +02:00
Родитель a4dd707ac4
Коммит 1fbbc7b56f
2 изменённых файлов: 10 добавлений и 1 удалений

Просмотреть файл

@ -249,7 +249,6 @@ class PageController extends Controller {
}
$this->publishInitialStateForUser($user, $this->rootFolder, $this->appManager);
$this->initialStateService->provideInitialState('talk', 'enable_matterbridge', $this->serverConfig->getAppValue('spreed', 'enable_matterbridge', '0') === '1');
if (class_exists(LoadViewer::class)) {
$this->eventDispatcher->dispatchTyped(new LoadViewer());

Просмотреть файл

@ -102,6 +102,11 @@ trait TInitialState {
'talk', 'attachment_folder',
$attachmentFolder
);
$this->initialStateService->provideInitialState(
'talk', 'enable_matterbridge',
$this->serverConfig->getAppValue('spreed', 'enable_matterbridge', '0') === '1'
);
}
protected function publishInitialStateForGuest(): void {
@ -121,5 +126,10 @@ trait TInitialState {
'talk', 'attachment_folder',
''
);
$this->initialStateService->provideInitialState(
'talk', 'enable_matterbridge',
false
);
}
}