fix: #14130, set addressee on follow, undo(follow), and accept(follow)

This commit is contained in:
Julian Lam
2026-03-29 21:19:38 -04:00
parent 9b7d62be5e
commit f3eeec93df
2 changed files with 4 additions and 0 deletions

View File

@@ -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',

View File

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