mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: errant mention detection via actors.note
- also removed duplicate parsing of post content when retrieving object via AP
This commit is contained in:
@@ -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 || [];
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user