fix: errant mention detection via actors.note

- also removed duplicate parsing of post content when retrieving object via AP
This commit is contained in:
Julian Lam
2024-10-29 14:51:55 -04:00
parent 05c8ee9f02
commit 22dbf15e5e
2 changed files with 2 additions and 2 deletions

View File

@@ -349,7 +349,7 @@ Mocks.notes.public = async (post) => {
} }
if (mentionsEnabled) { if (mentionsEnabled) {
const mentions = require.main.require('nodebb-plugin-mentions'); const mentions = require.main.require('nodebb-plugin-mentions');
const matches = await mentions.getMatches(post.content); const matches = await mentions.getMatches(content);
if (matches.size) { if (matches.size) {
tag = tag || []; tag = tag || [];

View File

@@ -69,7 +69,7 @@ Actors.note = async function (req, res) {
} }
const post = (await posts.getPostSummaryByPids([req.params.pid], req.uid, { const post = (await posts.getPostSummaryByPids([req.params.pid], req.uid, {
stripTags: false, parse: false,
extraFields: ['edited'], extraFields: ['edited'],
})).pop(); })).pop();
if (!post) { if (!post) {