fix: federating category mentions

This commit is contained in:
Julian Lam
2024-07-09 15:42:08 -04:00
parent f605e188db
commit 00a266790d
2 changed files with 3 additions and 3 deletions

View File

@@ -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",

View File

@@ -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}`;
}