mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46: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;
|
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,
|
attributedTo: uid,
|
||||||
inReplyTo: toPid,
|
inReplyTo: toPid,
|
||||||
published, updated, name, content, sourceContent,
|
published, updated, name, content, sourceContent,
|
||||||
to, cc, attachment, tag,
|
to, cc, audience, attachment, tag,
|
||||||
// conversation, // mastodon-specific, ignored.
|
// conversation, // mastodon-specific, ignored.
|
||||||
} = object;
|
} = object;
|
||||||
|
|
||||||
@@ -128,7 +128,7 @@ Mocks.post = async (objects) => {
|
|||||||
|
|
||||||
edited,
|
edited,
|
||||||
editor: edited ? uid : undefined,
|
editor: edited ? uid : undefined,
|
||||||
_activitypub: { to, cc, attachment, tag, url },
|
_activitypub: { to, cc, audience, attachment, tag, url },
|
||||||
};
|
};
|
||||||
|
|
||||||
return payload;
|
return payload;
|
||||||
|
|||||||
Reference in New Issue
Block a user