popovers: Insert silent mentions for deactivated users.

Fixes #26858.
This commit is contained in:
M1gue11 2023-11-21 17:28:40 -03:00 committed by GitHub
parent 8a0428ffa5
commit 2e818a071e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -286,7 +286,7 @@ function get_user_card_popover_data(
status_content_available: Boolean(status_text || status_emoji_info),
status_text,
status_emoji_info,
user_mention_syntax: people.get_mention_syntax(user.full_name, user.user_id),
user_mention_syntax: people.get_mention_syntax(user.full_name, user.user_id, !is_active),
date_joined,
spectator_view,
should_add_guest_user_indicator: people.should_add_guest_user_indicator(user.user_id),
@ -742,7 +742,8 @@ function register_click_handlers() {
}
const user_id = elem_to_user_id($(e.target).parents("ul"));
const name = people.get_by_user_id(user_id).full_name;
const mention = people.get_mention_syntax(name, user_id);
const is_active = people.is_active_user_for_popover(user_id);
const mention = people.get_mention_syntax(name, user_id, !is_active);
compose_ui.insert_syntax_and_focus(mention);
message_user_card.hide();
e.stopPropagation();