Don't replace text mentions twice

This commit is contained in:
Jesse Wierzbinski 2024-04-10 12:41:06 -10:00
parent fde0ff509e
commit 742913a911
No known key found for this signature in database

View file

@ -299,17 +299,14 @@ export const createNewStatus = async (
.map((line) => `<p>${line}</p>`)
.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 = "";
}