From 742913a911acc57760b5dd9de3a0efc544d280a3 Mon Sep 17 00:00:00 2001 From: Jesse Wierzbinski Date: Wed, 10 Apr 2024 12:41:06 -1000 Subject: [PATCH] Don't replace text mentions twice --- database/entities/Status.ts | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/database/entities/Status.ts b/database/entities/Status.ts index 206faedf..443e0b23 100644 --- a/database/entities/Status.ts +++ b/database/entities/Status.ts @@ -299,17 +299,14 @@ export const createNewStatus = async ( .map((line) => `

${line}

`) .join("\n"); - htmlContent = linkifyHtml( - await replaceTextMentions(htmlContent, mentions ?? []), - { - defaultProtocol: "https", - validate: { - email: () => false, - }, - target: "_blank", - rel: "nofollow noopener noreferrer", + htmlContent = linkifyHtml(htmlContent, { + defaultProtocol: "https", + validate: { + email: () => false, }, - ); + target: "_blank", + rel: "nofollow noopener noreferrer", + }); } else { htmlContent = ""; }