mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
feat: plumb audience into _activitypub when mocking posts
This commit is contained in:
@@ -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]]), []));
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user