mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-21 07:50:37 +01:00
feat: send id back during accepts
This commit is contained in:
@@ -178,6 +178,7 @@ inbox.follow = async (req) => {
|
|||||||
if (!assertion) {
|
if (!assertion) {
|
||||||
throw new Error('[[error:activitypub.invalid-id]]');
|
throw new Error('[[error:activitypub.invalid-id]]');
|
||||||
}
|
}
|
||||||
|
const handle = await user.getUserField(actor, 'username');
|
||||||
|
|
||||||
if (type === 'user') {
|
if (type === 'user') {
|
||||||
const exists = await user.exists(id);
|
const exists = await user.exists(id);
|
||||||
@@ -199,6 +200,7 @@ inbox.follow = async (req) => {
|
|||||||
|
|
||||||
user.onFollow(actor, id);
|
user.onFollow(actor, id);
|
||||||
activitypub.send('uid', id, actor, {
|
activitypub.send('uid', id, actor, {
|
||||||
|
id: `${nconf.get('url')}/${type}/${id}#activity/accept:follow/${handle}`,
|
||||||
type: 'Accept',
|
type: 'Accept',
|
||||||
object: {
|
object: {
|
||||||
id: followId,
|
id: followId,
|
||||||
@@ -225,6 +227,7 @@ inbox.follow = async (req) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
activitypub.send('cid', id, actor, {
|
activitypub.send('cid', id, actor, {
|
||||||
|
id: `${nconf.get('url')}/${type}/${id}#activity/accept:follow/${handle}`,
|
||||||
type: 'Accept',
|
type: 'Accept',
|
||||||
object: {
|
object: {
|
||||||
id: followId,
|
id: followId,
|
||||||
|
|||||||
Reference in New Issue
Block a user