mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 00:56:13 +01:00
fix: restore old behaviour of 1b12 federating both object and activity
This commit is contained in:
@@ -26,12 +26,14 @@ Feps.announce = async function announce(id, activity) {
|
||||
}
|
||||
|
||||
winston.info(`[activitypub/inbox.announce(1b12)] Announcing ${activity.type} to followers of cid ${cid}`);
|
||||
await activitypub.send('cid', cid, followers, {
|
||||
id: `${nconf.get('url')}/post/${encodeURIComponent(id)}#activity/announce/${Date.now()}`,
|
||||
type: 'Announce',
|
||||
actor: `${nconf.get('url')}/category/${cid}`,
|
||||
to: [`${nconf.get('url')}/category/${cid}/followers`],
|
||||
cc: [actor, activitypub._constants.publicAddress],
|
||||
object: activity,
|
||||
});
|
||||
await Promise.all([activity, activity.object].map(async (object) => {
|
||||
await activitypub.send('cid', cid, followers, {
|
||||
id: `${nconf.get('url')}/post/${encodeURIComponent(id)}#activity/announce/${Date.now()}`,
|
||||
type: 'Announce',
|
||||
actor: `${nconf.get('url')}/category/${cid}`,
|
||||
to: [`${nconf.get('url')}/category/${cid}/followers`],
|
||||
cc: [actor, activitypub._constants.publicAddress],
|
||||
object,
|
||||
});
|
||||
}));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user