mirror of
https://github.com/zulip/zulip.git
synced 2025-11-08 16:01:58 +00:00
compose: Validate stream message mentions on edit save.
This commit adds a message mentions validation for message editing. The behavior will be similar to the validation on the compose box when the user sends a message. Fixes: #25411.
This commit is contained in:
committed by
Tim Abbott
parent
1bab164d39
commit
dd65ec2916
@@ -474,10 +474,15 @@ export function initialize() {
|
||||
`.${CSS.escape(compose_banner.CLASSNAMES.wildcard_warning)} .compose_banner_action_button`,
|
||||
(event) => {
|
||||
event.preventDefault();
|
||||
const {$banner_container} = get_input_info(event);
|
||||
const {$banner_container, is_edit_input} = get_input_info(event);
|
||||
const $row = $(event.target).closest(".message_row");
|
||||
compose_validate.clear_wildcard_warnings($banner_container);
|
||||
compose_validate.set_user_acknowledged_wildcard_flag(true);
|
||||
finish();
|
||||
if (is_edit_input) {
|
||||
message_edit.save_message_row_edit($row);
|
||||
} else {
|
||||
finish();
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user