Node.js based forum software built for the modern web
fix: #14130, set addressee on follow, undo(follow), and accept(follow)
Julian Lamf3eeec93df5d
diff --git a/src/activitypub/inbox.js b/src/activitypub/inbox.jsindex b8967cbef5..bfa19d7823 100644--- a/src/activitypub/inbox.js+++ b/src/activitypub/inbox.js@@ -529,6 +529,7 @@ inbox.follow = async (req) => {activitypub.send('uid', id, actor, {id: `${nconf.get('url')}/${type}/${id}#activity/accept:follow/${handle}/${Date.now()}`,type: 'Accept',+ to: [actor],object: {id: followId,type: 'Follow',@@ -556,6 +557,7 @@ inbox.follow = async (req) => {activitypub.send('cid', id, actor, {id: `${nconf.get('url')}/${type}/${id}#activity/accept:follow/${handle}/${Date.now()}`,type: 'Accept',+ to: [actor],object: {id: followId,type: 'Follow',diff --git a/src/activitypub/out.js b/src/activitypub/out.jsindex 5242e6df6d..d92c8dc29c 100644--- a/src/activitypub/out.js+++ b/src/activitypub/out.js@@ -65,6 +65,7 @@ Out.follow = enabledCheck(async (type, id, actor) => {await activitypub.send(type, id, [actor], {id: `${nconf.get('url')}/${type}/${id}#activity/follow/${encodeURIComponent(actor)}/${timestamp}`,type: 'Follow',+ to: [actor],object: actor,});} catch (e) {@@ -462,6 +463,7 @@ Out.undo.follow = enabledCheck(async (type, id, actor) => {await activitypub.send(type, id, [actor], {id: `${nconf.get('url')}/${type}/${id}#activity/undo:follow/${encodeURIComponent(actor)}/${timestamp}`,type: 'Undo',+ to: [actor],actor: object.actor,object,});