mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
feat: send back follow id in Accept
This commit is contained in:
@@ -167,7 +167,7 @@ inbox.announce = async (req) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
inbox.follow = async (req) => {
|
inbox.follow = async (req) => {
|
||||||
const { actor, object } = req.body;
|
const { actor, object, id: followId } = req.body;
|
||||||
// Sanity checks
|
// Sanity checks
|
||||||
const { type, id } = await helpers.resolveLocalId(object.id);
|
const { type, id } = await helpers.resolveLocalId(object.id);
|
||||||
if (!['category', 'user'].includes(type)) {
|
if (!['category', 'user'].includes(type)) {
|
||||||
@@ -201,8 +201,10 @@ inbox.follow = async (req) => {
|
|||||||
activitypub.send('uid', id, actor, {
|
activitypub.send('uid', id, actor, {
|
||||||
type: 'Accept',
|
type: 'Accept',
|
||||||
object: {
|
object: {
|
||||||
|
id: followId,
|
||||||
type: 'Follow',
|
type: 'Follow',
|
||||||
actor,
|
actor,
|
||||||
|
object: object.id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
} else if (type === 'category') {
|
} else if (type === 'category') {
|
||||||
@@ -225,6 +227,7 @@ inbox.follow = async (req) => {
|
|||||||
activitypub.send('cid', id, actor, {
|
activitypub.send('cid', id, actor, {
|
||||||
type: 'Accept',
|
type: 'Accept',
|
||||||
object: {
|
object: {
|
||||||
|
id: followId,
|
||||||
type: 'Follow',
|
type: 'Follow',
|
||||||
actor,
|
actor,
|
||||||
object: object.id,
|
object: object.id,
|
||||||
|
|||||||
Reference in New Issue
Block a user