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) {
|
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 || [];
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user