diff options
author | Vitor Mattos <vitor@php.rio> | 2023-05-05 05:18:29 -0300 |
---|---|---|
committer | Vitor Mattos <vitor@php.rio> | 2023-05-05 05:18:58 -0300 |
commit | 7e9a76887a595ca798c051036a7af8cb066d3b26 (patch) | |
tree | c5130534fd996f3f88cd0d5ee0d8beb325b0f124 /lib | |
parent | 744ec4cd62979b3c4a4073a624c1f3e3f6e4ec3b (diff) |
Improvements after code review
Signed-off-by: Vitor Mattos <vitor@php.rio>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Controller/SettingsController.php | 6 | ||||
-rw-r--r-- | lib/TInitialState.php | 2 |
2 files changed, 2 insertions, 6 deletions
diff --git a/lib/Controller/SettingsController.php b/lib/Controller/SettingsController.php index 8a7682e00..ac5592862 100644 --- a/lib/Controller/SettingsController.php +++ b/lib/Controller/SettingsController.php @@ -114,11 +114,7 @@ class SettingsController extends OCSController { return false; } - if ($setting === 'typing_privacy') { - return $value === '1' || $value === '0'; - } - - if ($setting === 'read_status_privacy') { + if ($setting === 'typing_privacy' || $setting === 'read_status_privacy') { return (int) $value === Participant::PRIVACY_PUBLIC || (int) $value === Participant::PRIVACY_PRIVATE; } diff --git a/lib/TInitialState.php b/lib/TInitialState.php index cf0d6e489..2df881eed 100644 --- a/lib/TInitialState.php +++ b/lib/TInitialState.php @@ -197,7 +197,7 @@ trait TInitialState { $this->initialState->provideInitialState( 'typing_privacy', - '0' + Participant::PRIVACY_PUBLIC ); $this->initialState->provideInitialState( |