Skip to content

Node.js based forum software built for the modern web

fix: federating category mentions

Julian Lam00a266790d16
diff --git a/install/package.json b/install/package.json
index 913d8920b1..71f51b8bc2 100644
--- a/install/package.json
+++ b/install/package.json
@@ -101,7 +101,7 @@
"nodebb-plugin-emoji": "5.1.15",
"nodebb-plugin-emoji-android": "4.0.0",
"nodebb-plugin-markdown": "13.0.0-pre.8",
- "nodebb-plugin-mentions": "4.6.6",
+ "nodebb-plugin-mentions": "4.6.7",
"nodebb-plugin-ntfy": "1.7.4",
"nodebb-plugin-spam-be-gone": "2.2.2",
"nodebb-rewards-essentials": "1.0.0",
diff --git a/src/activitypub/mocks.js b/src/activitypub/mocks.js
index af63d47fbb..e90cd564c0 100644
--- a/src/activitypub/mocks.js
+++ b/src/activitypub/mocks.js
@@ -327,10 +327,10 @@ Mocks.note = async (post) => {
if (matches.size) {
tag = tag || [];
- tag.push(...Array.from(matches).map(({ id: href, slug: name }) => {
+ tag.push(...Array.from(matches).map(({ type, id: href, slug: name }) => {
if (utils.isNumber(href)) { // local ref
name = name.toLowerCase(); // local slugs are always lowercase
- href = `${nconf.get('url')}/user/${name.slice(1)}`;
+ href = `${nconf.get('url')}/${type === 'uid' ? 'user' : `category/${href}`}/${name.slice(1)}`;
name = `${name}@${nconf.get('url_parsed').hostname}`;
}