Make isTalkEnabled an attribute

Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
This commit is contained in:
Pablo Zmdl 2026-01-19 12:03:38 +01:00
parent 32e1f84bc9
commit aca1ec163d
5 changed files with 10 additions and 24 deletions

View file

@ -83,6 +83,11 @@ class ConfigurationManager
set { $this->set('isCollaboraEnabled', $value); }
}
public bool $isTalkEnabled {
get => $this->get('isTalkEnabled', true);
set { $this->set('isTalkEnabled', $value); }
}
public function GetConfig() : array
{
if ($this->config === [] && file_exists(DataConst::GetConfigFile()))
@ -253,21 +258,6 @@ class ConfigurationManager
$this->WriteConfig($config);
}
public function isTalkEnabled() : bool {
$config = $this->GetConfig();
if (isset($config['isTalkEnabled']) && $config['isTalkEnabled'] === 0) {
return false;
} else {
return true;
}
}
public function SetTalkEnabledState(int $value) : void {
$config = $this->GetConfig();
$config['isTalkEnabled'] = $value;
$this->WriteConfig($config);
}
public function isTalkRecordingEnabled() : bool {
if (!$this->isTalkEnabled()) {
return false;