fix: restore old behaviour of 1b12 federating both object and activity

This commit is contained in:
Julian Lam
2025-02-13 17:07:08 -05:00
parent 6b8e4b3906
commit f0ee43dcc1

View File

@@ -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,
});
}));
}; };