feat: plumb audience into _activitypub when mocking posts

This commit is contained in:
Julian Lam
2024-06-13 17:05:37 -04:00
parent 3567f55a5d
commit d9f1fa3ad3
2 changed files with 5 additions and 2 deletions

View File

@@ -353,3 +353,6 @@ Helpers.remoteAnchorToLocalProfile = async (content) => {
return content;
};
// eslint-disable-next-line max-len
Helpers.makeSet = (object, properties) => new Set(properties.reduce((memo, property) => memo.concat(Array.isArray(object[property]) ? object[property] : [object[property]]), []));

View File

@@ -101,7 +101,7 @@ Mocks.post = async (objects) => {
attributedTo: uid,
inReplyTo: toPid,
published, updated, name, content, sourceContent,
to, cc, attachment, tag,
to, cc, audience, attachment, tag,
// conversation, // mastodon-specific, ignored.
} = object;
@@ -128,7 +128,7 @@ Mocks.post = async (objects) => {
edited,
editor: edited ? uid : undefined,
_activitypub: { to, cc, attachment, tag, url },
_activitypub: { to, cc, audience, attachment, tag, url },
};
return payload;