Skip to content

Node.js based forum software built for the modern web

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

Julian Lamf0ee43dcc169
diff --git a/src/activitypub/feps.js b/src/activitypub/feps.js
index 19da36a09c..bfed682671 100644
--- a/src/activitypub/feps.js
+++ b/src/activitypub/feps.js
@@ -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,
+ });
+ }));
};