mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-30 10:35:55 +01:00
test: refactor AP tests
This commit is contained in:
@@ -27,7 +27,9 @@ Notes.assert = async (uid, input, options = {}) => {
|
||||
|
||||
await Promise.all(input.map(async (item) => {
|
||||
let id = activitypub.helpers.isUri(item) ? item : item.pid;
|
||||
id = await Notes.resolveId(uid, id);
|
||||
if (activitypub.helpers.isUri(id)) {
|
||||
id = await Notes.resolveId(uid, id);
|
||||
}
|
||||
const key = `post:${id}`;
|
||||
const exists = await db.exists(key);
|
||||
winston.verbose(`[activitypub/notes.assert] Asserting note id ${id}`);
|
||||
|
||||
Reference in New Issue
Block a user