compose: Simplify user_acknowledged_wildcard to a Boolean.

This commit is contained in:
Daniil Fadeev
2023-05-09 12:24:32 +04:00
committed by Tim Abbott
parent f914e2a54e
commit 1bab164d39
2 changed files with 3 additions and 3 deletions

View File

@@ -374,7 +374,7 @@ export function validate_stream_message_mentions(stream_id, $banner_container, w
return false;
}
if (user_acknowledged_wildcard === undefined || user_acknowledged_wildcard === false) {
if (!user_acknowledged_wildcard) {
show_wildcard_warnings(stream_id, $banner_container, wildcard_mention);
$("#compose-send-button").prop("disabled", false);
@@ -386,7 +386,7 @@ export function validate_stream_message_mentions(stream_id, $banner_container, w
clear_wildcard_warnings($banner_container);
}
// at this point, the user has either acknowledged the warning or removed @all / @everyone
user_acknowledged_wildcard = undefined;
user_acknowledged_wildcard = false;
return true;
}