diff --git a/web/src/message_list_tooltips.js b/web/src/message_list_tooltips.js index d2ad430eff..ee797f0ca9 100644 --- a/web/src/message_list_tooltips.js +++ b/web/src/message_list_tooltips.js @@ -283,6 +283,14 @@ export function initialize() { message_list_tooltip(".view_user_card_tooltip", { delay: LONG_HOVER_DELAY, + onShow(instance) { + const is_bot = $(instance.reference).data("is-bot"); + if (is_bot) { + instance.setContent(parse_html($("#view-bot-card-tooltip-template").html())); + } else { + instance.setContent(parse_html($("#view-user-card-tooltip-template").html())); + } + }, onHidden(instance) { instance.destroy(); }, diff --git a/web/templates/message_avatar.hbs b/web/templates/message_avatar.hbs index 737fb7fd41..df614d526b 100644 --- a/web/templates/message_avatar.hbs +++ b/web/templates/message_avatar.hbs @@ -1,4 +1,4 @@ -