Skip to content

Node.js based forum software built for the modern web

test: check if tests pass without await

Barış Soner Uşaklı5414cf473de8
diff --git a/src/api/topics.js b/src/api/topics.js
index 054602e7a2..ac3951f4d7 100644
--- a/src/api/topics.js
+++ b/src/api/topics.js
@@ -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;
};