From 4a8b06e8159715ad25d85d18d6adf459e9e5df68 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 7 Mar 2024 16:47:09 -0500 Subject: [PATCH] fix: send explicitly empty array for attachment prop in mocks.note --- src/activitypub/mocks.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/activitypub/mocks.js b/src/activitypub/mocks.js index 4105f8885e..2ae91dbf10 100644 --- a/src/activitypub/mocks.js +++ b/src/activitypub/mocks.js @@ -239,6 +239,7 @@ Mocks.note = async (post) => { tag = tag || []; tag.push(...Array.from(matches).map(({ 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)}`; name = `${name}@${nconf.get('url_parsed').hostname}`; } @@ -272,6 +273,7 @@ Mocks.note = async (post) => { mediaType: 'text/markdown', }, tag, + attachment: [], // todo... requires refactoring of link preview plugin // replies: {} todo... };