mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-06 10:17:15 +02:00
fix: #14130, set addressee on follow, undo(follow), and accept(follow)
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user