mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 16:37:23 +00:00
org_settings: Fix data collection of message retention property.
In handlebars and settings_org.js, the subsection in which `realm_message_retention_days` property lies doesn't agree, and this wasn't observed for a long time as it's disabled, still to make things right, in this commit we have moved the logic which handles the collection of data from `other_permission` to `other_settings` as it makes more sense there.
This commit is contained in:
committed by
Tim Abbott
parent
ed30f71e07
commit
3dd5e1642b
@@ -668,9 +668,7 @@ exports.build_page = function () {
|
||||
data.message_content_delete_limit_seconds =
|
||||
exports.msg_delete_limit_dropdown_values[delete_limit_setting_value].seconds;
|
||||
}
|
||||
} else if (subsection === 'other_permissions') {
|
||||
var create_stream_permission = $("#id_realm_create_stream_permission").val();
|
||||
var add_emoji_permission = $("#id_realm_add_emoji_by_admins_only").val();
|
||||
} else if (subsection == 'other_settings') {
|
||||
var new_message_retention_days = $("#id_realm_message_retention_days").val();
|
||||
|
||||
if (parseInt(new_message_retention_days, 10).toString() !== new_message_retention_days
|
||||
@@ -680,6 +678,9 @@ exports.build_page = function () {
|
||||
|
||||
data.message_retention_days = new_message_retention_days !== "" ?
|
||||
JSON.stringify(parseInt(new_message_retention_days, 10)) : null;
|
||||
} else if (subsection === 'other_permissions') {
|
||||
var create_stream_permission = $("#id_realm_create_stream_permission").val();
|
||||
var add_emoji_permission = $("#id_realm_add_emoji_by_admins_only").val();
|
||||
|
||||
if (add_emoji_permission === "by_admins_only") {
|
||||
data.add_emoji_by_admins_only = true;
|
||||
|
||||
Reference in New Issue
Block a user