mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 20:16:04 +01:00
feat: basic retry queue
This commit is contained in:
@@ -412,3 +412,14 @@ inbox.flag = async (req) => {
|
||||
}
|
||||
}));
|
||||
};
|
||||
|
||||
inbox.reject = async (req) => {
|
||||
const { actor, object } = req.body;
|
||||
const { type, id } = object;
|
||||
const { hostname } = new URL(actor);
|
||||
const queueId = `${type}:${id}:${hostname}`;
|
||||
|
||||
// stop retrying rejected requests
|
||||
clearTimeout(activitypub.retryQueue.get(queueId));
|
||||
activitypub.retryQueue.delete(queueId);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user