Skip to content

Node.js based forum software built for the modern web

fix: errant mention detection via actors.note

Julian Lam22dbf15e5ec5
diff --git a/src/activitypub/mocks.js b/src/activitypub/mocks.js
index 5681425843..e1e2e0f581 100644
--- a/src/activitypub/mocks.js
+++ b/src/activitypub/mocks.js
@@ -349,7 +349,7 @@ Mocks.notes.public = async (post) => {
}
if (mentionsEnabled) {
const mentions = require.main.require('nodebb-plugin-mentions');
- const matches = await mentions.getMatches(post.content);
+ const matches = await mentions.getMatches(content);
if (matches.size) {
tag = tag || [];
diff --git a/src/controllers/activitypub/actors.js b/src/controllers/activitypub/actors.js
index b7ecdec173..b477069927 100644
--- a/src/controllers/activitypub/actors.js
+++ b/src/controllers/activitypub/actors.js
@@ -69,7 +69,7 @@ Actors.note = async function (req, res) {
}
const post = (await posts.getPostSummaryByPids([req.params.pid], req.uid, {
- stripTags: false,
+ parse: false,
extraFields: ['edited'],
})).pop();
if (!post) {