settings: Add a "Followed topics" row to Notification Triggers table.

This commit adds a "Followed topics" row to the 'Notification Triggers'
table in the 'Personal settings > Notifications' panel and the
'Organization settings > Default user settings' panel.

This adds support to control email, push, wildcard mention,
visual desktop, and audible desktop notifications for messages
sent to followed topics by toggling corresponding global
notification settings.

The "Followed topics" row is available in the development
environment only.
This commit is contained in:
Prakhar Pratyush
2023-06-13 16:48:55 +05:30
committed by Tim Abbott
parent 134058b06d
commit cbde01e9e3
6 changed files with 81 additions and 11 deletions

View File

@@ -17,6 +17,11 @@ run_test("all_notifications", () => {
user_settings.enable_sounds = true;
user_settings.enable_offline_push_notifications = false;
user_settings.enable_offline_email_notifications = true;
user_settings.enable_followed_topic_desktop_notifications = false;
user_settings.enable_followed_topic_audible_notifications = true;
user_settings.enable_followed_topic_push_notifications = false;
user_settings.enable_followed_topic_email_notifications = true;
user_settings.enable_followed_topic_wildcard_mentions_notify = false;
// Check that it throws error if incorrect settings name
// is passed. In this case, we articulate that with
@@ -97,5 +102,35 @@ run_test("all_notifications", () => {
},
],
},
{
label: "translated: Followed topics",
notification_settings: [
{
is_checked: false,
is_disabled: false,
setting_name: "enable_followed_topic_desktop_notifications",
},
{
is_checked: true,
is_disabled: false,
setting_name: "enable_followed_topic_audible_notifications",
},
{
is_checked: false,
is_disabled: true,
setting_name: "enable_followed_topic_push_notifications",
},
{
is_checked: true,
is_disabled: false,
setting_name: "enable_followed_topic_email_notifications",
},
{
is_checked: false,
is_disabled: false,
setting_name: "enable_followed_topic_wildcard_mentions_notify",
},
],
},
]);
});