mirror of https://github.com/zulip/zulip.git
message_edit: Avoid confusing notice editing wildcard mention messages.
It's highly confusing to suggest to a user that we'll send a second notification to all users when that's not the case. Fixes #25507.
This commit is contained in:
parent
859a96e0d7
commit
6e0ea3d79a
|
@ -907,14 +907,17 @@ export function save_message_row_edit($row) {
|
|||
changed = old_content !== new_content;
|
||||
}
|
||||
|
||||
const wildcard_mention = util.find_wildcard_mentions(new_content);
|
||||
const is_stream_message_mentions_valid = compose_validate.validate_stream_message_mentions(
|
||||
stream_id,
|
||||
$banner_container,
|
||||
wildcard_mention,
|
||||
);
|
||||
if (!is_stream_message_mentions_valid) {
|
||||
return;
|
||||
const already_has_wildcard_mention = message.wildcard_mentioned;
|
||||
if (!already_has_wildcard_mention) {
|
||||
const wildcard_mention = util.find_wildcard_mentions(new_content);
|
||||
const is_stream_message_mentions_valid = compose_validate.validate_stream_message_mentions(
|
||||
stream_id,
|
||||
$banner_container,
|
||||
wildcard_mention,
|
||||
);
|
||||
if (!is_stream_message_mentions_valid) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
show_message_edit_spinner($row);
|
||||
|
|
Loading…
Reference in New Issue