compose: Fix display of compose banner when dm disallowed.

Previously, when the compose bar was open with any DM recipient,
and the organization wide setting to disallow DM is toggled, then
the DM not allowed banner is not displayed on the compose until
it is reopened.

This is fixed by changing the server event dispatch of
private_message_policy from noop to a method to  check for
the compose's posting policy status, and display the banner.

Fixes #27774
This commit is contained in:
roanster007 2023-12-09 14:09:45 +05:30 committed by Tim Abbott
parent b000328ba5
commit 69de75ec0b
1 changed files with 1 additions and 1 deletions

View File

@ -230,7 +230,7 @@ export function dispatch_normal_event(event) {
name_changes_disabled: settings_account.update_name_change_display, name_changes_disabled: settings_account.update_name_change_display,
notifications_stream_id: stream_ui_updates.update_announce_stream_option, notifications_stream_id: stream_ui_updates.update_announce_stream_option,
org_type: noop, org_type: noop,
private_message_policy: noop, private_message_policy: compose_recipient.check_posting_policy_for_compose_box,
push_notifications_enabled: noop, push_notifications_enabled: noop,
send_welcome_emails: noop, send_welcome_emails: noop,
message_content_allowed_in_email_notifications: noop, message_content_allowed_in_email_notifications: noop,