mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-21 15:03:12 +01:00
test: check if tests pass without await
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const winston = require('winston');
|
||||
|
||||
const user = require('../user');
|
||||
const topics = require('../topics');
|
||||
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 });
|
||||
|
||||
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;
|
||||
@@ -118,6 +122,10 @@ topicsAPI.reply = async function (caller, data) {
|
||||
socketHelpers.notifyNew(caller.uid, 'newPost', result);
|
||||
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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user