mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
settings: Fix updating email notification batching period setting.
There was a bug when updating email notification batching period setting to a custom value not present in dropdown because "email_notifications_batching_period_minutes" is just a name used for input elements and we do not use it to store the setting value as it is just stored in seconds.
This commit is contained in:
@@ -250,7 +250,6 @@ export function set_up(settings_panel: SettingsPanel): void {
|
||||
stream_notification_setting_changed(e.currentTarget);
|
||||
return;
|
||||
}
|
||||
const setting_name = user_settings_schema.keyof().parse($input_elem.attr("name"));
|
||||
|
||||
if ($input_elem.attr("data-setting-widget-type") === "time-limit") {
|
||||
// For time-limit settings we should always pass the select element
|
||||
@@ -264,7 +263,7 @@ export function set_up(settings_panel: SettingsPanel): void {
|
||||
// Currently only notification batching setting is the time-limit
|
||||
// settings on this page.
|
||||
if (
|
||||
setting_name === "email_notifications_batching_period_seconds" &&
|
||||
$input_elem.attr("name") === "email_notifications_batching_period_seconds" &&
|
||||
$input_elem.val() === "custom_period"
|
||||
) {
|
||||
set_notification_batching_ui(
|
||||
@@ -283,6 +282,7 @@ export function set_up(settings_panel: SettingsPanel): void {
|
||||
return;
|
||||
}
|
||||
|
||||
const setting_name = user_settings_schema.keyof().parse($input_elem.attr("name"));
|
||||
// This filters out the GroupSettingValue
|
||||
const setting_value = z
|
||||
.union([z.string(), z.number(), z.boolean()])
|
||||
|
||||
Reference in New Issue
Block a user