settings: Add default typing indicator user settings.

This commit adds two settings to 'SETTINGS / DEFAULT USER SETTINGS':
* Let recipients see when a user is typing direct messages
* Let recipients see when a user is typing stream messages
This commit is contained in:
Prakhar Pratyush
2023-10-14 01:31:01 +05:30
committed by Tim Abbott
parent 0c357f990d
commit e01ffba143
3 changed files with 18 additions and 0 deletions

View File

@@ -34,6 +34,8 @@ export type RealmDefaultSettings = {
notification_sound: string;
pm_content_in_desktop_notifications: boolean;
presence_enabled: boolean;
send_private_typing_notifications: boolean;
send_stream_typing_notifications: boolean;
realm_name_in_email_notifications_policy: number;
starred_message_counts: boolean;
translate_emoticons: boolean;

View File

@@ -604,6 +604,12 @@ export const realm_user_settings_defaults_labels = {
realm_presence_enabled_parens_text: $t({defaultMessage: "invisible mode off"}),
realm_enter_sends: $t({defaultMessage: "Enter sends when composing a message"}),
realm_send_read_receipts: $t({defaultMessage: "Allow other users to view read receipts"}),
realm_send_private_typing_notifications: $t({
defaultMessage: "Let recipients see when a user is typing direct messages",
}),
realm_send_stream_typing_notifications: $t({
defaultMessage: "Let recipients see when a user is typing stream messages",
}),
};
// NOTIFICATIONS

View File

@@ -15,6 +15,16 @@
<h3 class="inline-block">{{t "Privacy settings" }}</h3>
{{> settings_save_discard_widget section_name="privacy-setting" show_only_indicator=false }}
</div>
{{> settings_checkbox
setting_name="send_private_typing_notifications"
is_checked=settings_object.send_private_typing_notifications
label=settings_label.realm_send_private_typing_notifications
prefix="realm_"}}
{{> settings_checkbox
setting_name="send_stream_typing_notifications"
is_checked=settings_object.send_stream_typing_notifications
label=settings_label.realm_send_stream_typing_notifications
prefix="realm_"}}
{{> settings_checkbox
setting_name="presence_enabled"
is_checked=settings_object.presence_enabled