mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-20 07:20:27 +01:00
Compare commits
1 Commits
context-de
...
ap-send-pr
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
42ffec1250 |
@@ -21,7 +21,7 @@ const helpers = require('./helpers');
|
|||||||
const inbox = module.exports;
|
const inbox = module.exports;
|
||||||
|
|
||||||
function reject(type, object, target, senderType = 'uid', id = 0) {
|
function reject(type, object, target, senderType = 'uid', id = 0) {
|
||||||
activitypub.send(senderType, id, target, {
|
return activitypub.send(senderType, id, target, {
|
||||||
id: `${helpers.resolveActor(senderType, id)}#/activity/reject/${encodeURIComponent(object.id)}`,
|
id: `${helpers.resolveActor(senderType, id)}#/activity/reject/${encodeURIComponent(object.id)}`,
|
||||||
type: 'Reject',
|
type: 'Reject',
|
||||||
object: {
|
object: {
|
||||||
@@ -408,7 +408,7 @@ inbox.follow = async (req) => {
|
|||||||
await user.setUserField(id, 'followerRemoteCount', followerRemoteCount);
|
await user.setUserField(id, 'followerRemoteCount', followerRemoteCount);
|
||||||
|
|
||||||
await user.onFollow(actor, id);
|
await user.onFollow(actor, id);
|
||||||
activitypub.send('uid', id, actor, {
|
await activitypub.send('uid', id, actor, {
|
||||||
id: `${nconf.get('url')}/${type}/${id}#activity/accept:follow/${handle}/${Date.now()}`,
|
id: `${nconf.get('url')}/${type}/${id}#activity/accept:follow/${handle}/${Date.now()}`,
|
||||||
type: 'Accept',
|
type: 'Accept',
|
||||||
object: {
|
object: {
|
||||||
@@ -435,7 +435,7 @@ inbox.follow = async (req) => {
|
|||||||
await user.setCategoryWatchState(actor, id, categories.watchStates.tracking);
|
await user.setCategoryWatchState(actor, id, categories.watchStates.tracking);
|
||||||
}
|
}
|
||||||
|
|
||||||
activitypub.send('cid', id, actor, {
|
await activitypub.send('cid', id, actor, {
|
||||||
id: `${nconf.get('url')}/${type}/${id}#activity/accept:follow/${handle}/${Date.now()}`,
|
id: `${nconf.get('url')}/${type}/${id}#activity/accept:follow/${handle}/${Date.now()}`,
|
||||||
type: 'Accept',
|
type: 'Accept',
|
||||||
object: {
|
object: {
|
||||||
|
|||||||
@@ -405,7 +405,7 @@ ActivityPub.send = async (type, id, targets, payload) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const oneMinute = 1000 * 60;
|
const oneMinute = 1000 * 60;
|
||||||
batch.processArray(inboxes, async (inboxBatch) => {
|
return batch.processArray(inboxes, async (inboxBatch) => {
|
||||||
const retryQueueAdd = [];
|
const retryQueueAdd = [];
|
||||||
const retryQueuedSet = [];
|
const retryQueuedSet = [];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user