Compare commits

...

1 Commits

Author SHA1 Message Date
Barış Soner Uşaklı
42ffec1250 test: add await to send
return promise from ap.send
2025-09-09 12:09:35 -04:00
2 changed files with 4 additions and 4 deletions

View File

@@ -21,7 +21,7 @@ const helpers = require('./helpers');
const inbox = module.exports;
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)}`,
type: 'Reject',
object: {
@@ -408,7 +408,7 @@ inbox.follow = async (req) => {
await user.setUserField(id, 'followerRemoteCount', followerRemoteCount);
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()}`,
type: 'Accept',
object: {
@@ -435,7 +435,7 @@ inbox.follow = async (req) => {
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()}`,
type: 'Accept',
object: {

View File

@@ -405,7 +405,7 @@ ActivityPub.send = async (type, id, targets, payload) => {
};
const oneMinute = 1000 * 60;
batch.processArray(inboxes, async (inboxBatch) => {
return batch.processArray(inboxes, async (inboxBatch) => {
const retryQueueAdd = [];
const retryQueuedSet = [];