diff --git a/lib/shared/messages/text-message-spec.js b/lib/shared/messages/text-message-spec.js --- a/lib/shared/messages/text-message-spec.js +++ b/lib/shared/messages/text-message-spec.js @@ -40,7 +40,10 @@ stripSpoilersFromNotifications, stripSpoilersFromMarkdownAST, } from '../markdown.js'; -import { isUserMentioned } from '../mention-utils.js'; +import { + isUserMentioned, + renderChatMentionsWithAltText, +} from '../mention-utils.js'; import { notifTextsForSidebarCreation } from '../notif-utils.js'; import { threadIsGroupChat, @@ -244,22 +247,22 @@ messageInfo.type === messageTypes.TEXT, 'messageInfo should be messageTypes.TEXT!', ); - const notificationTextWithoutSpoilers = stripSpoilersFromNotifications( - messageInfo.text, + const transformedNotificationText = stripSpoilersFromNotifications( + renderChatMentionsWithAltText(messageInfo.text), ); if (!threadInfo.name && !threadIsGroupChat(threadInfo)) { const thread = ET.thread({ display: 'uiName', threadInfo }); return { - merged: ET`${thread}: ${notificationTextWithoutSpoilers}`, - body: notificationTextWithoutSpoilers, + merged: ET`${thread}: ${transformedNotificationText}`, + body: transformedNotificationText, title: threadInfo.uiName, }; } else { const creator = ET.user({ userInfo: messageInfo.creator }); const thread = ET.thread({ display: 'shortName', threadInfo }); return { - merged: ET`${creator} to ${thread}: ${notificationTextWithoutSpoilers}`, - body: notificationTextWithoutSpoilers, + merged: ET`${creator} to ${thread}: ${transformedNotificationText}`, + body: transformedNotificationText, title: threadInfo.uiName, prefix: ET`${creator}:`, };