Skip to content

Commit

Permalink
feat(PersonalSettings): add setting to enable message search
Browse files Browse the repository at this point in the history
Signed-off-by: Edward Ly <[email protected]>
  • Loading branch information
edward-ly committed Nov 26, 2024
1 parent 1cea0f4 commit c913f4f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/Settings/Personal.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@ public function getForm(): TemplateResponse {
$email = $this->config->getUserValue($this->userId, Application::APP_ID, 'email');
$apiKey = $this->secretService->getEncryptedUserValue($this->userId, 'api_key') ? 'dummyKey' : '';
$fileActionEnabled = $this->config->getUserValue($this->userId, Application::APP_ID, 'file_action_enabled', '1') === '1';
$searchMessagesEnabled = $this->config->getUserValue($this->userId, Application::APP_ID, 'search_messages_enabled', '0') === '1';

$userConfig = [
'url' => $url,
'email' => $email,
'api_key' => $apiKey,
'file_action_enabled' => $fileActionEnabled,
'search_messages_enabled' => $searchMessagesEnabled,
];
$this->initialStateService->provideInitialState('user-config', $userConfig);
return new TemplateResponse(Application::APP_ID, 'personalSettings');
Expand Down
5 changes: 5 additions & 0 deletions src/components/PersonalSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@
@update:checked="onCheckboxChanged($event, 'file_action_enabled')">
{{ t('integration_zulip', 'Add file action to send files to Zulip') }}
</NcCheckboxRadioSwitch>
<NcCheckboxRadioSwitch
:checked.sync="state.search_messages_enabled"
@update:checked="onCheckboxChanged($event, 'search_messages_enabled')">
{{ t('integration_zulip', 'Enable searching for messages') }}
</NcCheckboxRadioSwitch>
</div>
</div>
</template>
Expand Down

0 comments on commit c913f4f

Please sign in to comment.