mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-22 04:12:16 +01:00
test: check if tests pass without await
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
const winston = require('winston');
|
||||||
|
|
||||||
const user = require('../user');
|
const user = require('../user');
|
||||||
const topics = require('../topics');
|
const topics = require('../topics');
|
||||||
const categories = require('../categories');
|
const categories = require('../categories');
|
||||||
@@ -80,7 +82,9 @@ topicsAPI.create = async function (caller, data) {
|
|||||||
socketHelpers.notifyNew(caller.uid, 'newTopic', { posts: [result.postData], topic: result.topicData });
|
socketHelpers.notifyNew(caller.uid, 'newTopic', { posts: [result.postData], topic: result.topicData });
|
||||||
|
|
||||||
if (!isScheduling) {
|
if (!isScheduling) {
|
||||||
await activitypub.out.create.note(caller.uid, result.postData.pid);
|
activitypub.out.create.note(caller.uid, result.postData.pid).catch((err) => {
|
||||||
|
winston.error(`[activitypub] create.note failed ${err.stack}`);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return result.topicData;
|
return result.topicData;
|
||||||
@@ -118,6 +122,10 @@ topicsAPI.reply = async function (caller, data) {
|
|||||||
socketHelpers.notifyNew(caller.uid, 'newPost', result);
|
socketHelpers.notifyNew(caller.uid, 'newPost', result);
|
||||||
await activitypub.out.create.note(caller.uid, postData);
|
await activitypub.out.create.note(caller.uid, postData);
|
||||||
|
|
||||||
|
activitypub.out.create.note(caller.uid, postData).catch((err) => {
|
||||||
|
winston.error(`[activitypub] create.note failed ${err.stack}`);
|
||||||
|
});
|
||||||
|
|
||||||
return postData;
|
return postData;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user