mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: send explicitly empty array for attachment prop in mocks.note
This commit is contained in:
@@ -239,6 +239,7 @@ Mocks.note = async (post) => {
|
|||||||
tag = tag || [];
|
tag = tag || [];
|
||||||
tag.push(...Array.from(matches).map(({ id: href, slug: name }) => {
|
tag.push(...Array.from(matches).map(({ id: href, slug: name }) => {
|
||||||
if (utils.isNumber(href)) { // local ref
|
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')}/user/${name.slice(1)}`;
|
||||||
name = `${name}@${nconf.get('url_parsed').hostname}`;
|
name = `${name}@${nconf.get('url_parsed').hostname}`;
|
||||||
}
|
}
|
||||||
@@ -272,6 +273,7 @@ Mocks.note = async (post) => {
|
|||||||
mediaType: 'text/markdown',
|
mediaType: 'text/markdown',
|
||||||
},
|
},
|
||||||
tag,
|
tag,
|
||||||
|
attachment: [], // todo... requires refactoring of link preview plugin
|
||||||
// replies: {} todo...
|
// replies: {} todo...
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user