mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 16:38:19 +01:00
Don't replace text mentions twice
This commit is contained in:
parent
fde0ff509e
commit
742913a911
|
|
@ -299,17 +299,14 @@ export const createNewStatus = async (
|
||||||
.map((line) => `<p>${line}</p>`)
|
.map((line) => `<p>${line}</p>`)
|
||||||
.join("\n");
|
.join("\n");
|
||||||
|
|
||||||
htmlContent = linkifyHtml(
|
htmlContent = linkifyHtml(htmlContent, {
|
||||||
await replaceTextMentions(htmlContent, mentions ?? []),
|
|
||||||
{
|
|
||||||
defaultProtocol: "https",
|
defaultProtocol: "https",
|
||||||
validate: {
|
validate: {
|
||||||
email: () => false,
|
email: () => false,
|
||||||
},
|
},
|
||||||
target: "_blank",
|
target: "_blank",
|
||||||
rel: "nofollow noopener noreferrer",
|
rel: "nofollow noopener noreferrer",
|
||||||
},
|
});
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
htmlContent = "";
|
htmlContent = "";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue