mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 09:06:15 +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}`);
|
winston.info(`[activitypub/inbox.announce(1b12)] Announcing ${activity.type} to followers of cid ${cid}`);
|
||||||
await activitypub.send('cid', cid, followers, {
|
await Promise.all([activity, activity.object].map(async (object) => {
|
||||||
id: `${nconf.get('url')}/post/${encodeURIComponent(id)}#activity/announce/${Date.now()}`,
|
await activitypub.send('cid', cid, followers, {
|
||||||
type: 'Announce',
|
id: `${nconf.get('url')}/post/${encodeURIComponent(id)}#activity/announce/${Date.now()}`,
|
||||||
actor: `${nconf.get('url')}/category/${cid}`,
|
type: 'Announce',
|
||||||
to: [`${nconf.get('url')}/category/${cid}/followers`],
|
actor: `${nconf.get('url')}/category/${cid}`,
|
||||||
cc: [actor, activitypub._constants.publicAddress],
|
to: [`${nconf.get('url')}/category/${cid}/followers`],
|
||||||
object: activity,
|
cc: [actor, activitypub._constants.publicAddress],
|
||||||
});
|
object,
|
||||||
|
});
|
||||||
|
}));
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user