Skip to content

Node.js based forum software built for the modern web

Revert "test: check if tests pass without await"

Barış Soner Uşaklıb405a09bfd02
diff --git a/src/api/topics.js b/src/api/topics.js
index ac3951f4d7..054602e7a2 100644
--- a/src/api/topics.js
+++ b/src/api/topics.js
@@ -1,7 +1,5 @@
'use strict';
-const winston = require('winston');
-
const user = require('../user');
const topics = require('../topics');
const categories = require('../categories');
@@ -82,9 +80,7 @@ topicsAPI.create = async function (caller, data) {
socketHelpers.notifyNew(caller.uid, 'newTopic', { posts: [result.postData], topic: result.topicData });
if (!isScheduling) {
- activitypub.out.create.note(caller.uid, result.postData.pid).catch((err) => {
- winston.error(`[activitypub] create.note failed ${err.stack}`);
- });
+ await activitypub.out.create.note(caller.uid, result.postData.pid);
}
return result.topicData;
@@ -122,10 +118,6 @@ 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;
};