mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 08:26:11 +00:00
compose-validate: Use settings config value for policy check.
Updates the check in compose validate for the organization's policy on sending private messages to use the code/value in settings_config, instead of the number value.
This commit is contained in:
committed by
Tim Abbott
parent
6b4ab21562
commit
f17030a802
@@ -483,7 +483,8 @@ function validate_private_message() {
|
||||
const user_ids = compose_pm_pill.get_user_ids();
|
||||
|
||||
if (
|
||||
page_params.realm_private_message_policy === 2 && // Frontend check for for PRIVATE_MESSAGE_POLICY_DISABLED
|
||||
page_params.realm_private_message_policy ===
|
||||
settings_config.private_message_policy_values.disabled.code &&
|
||||
(user_ids.length !== 1 || !people.get_by_user_id(user_ids[0]).is_bot)
|
||||
) {
|
||||
// Unless we're composing to a bot
|
||||
|
||||
Reference in New Issue
Block a user