Node.js based forum software built for the modern web
refactor: make a single call
Barış Soner Uşaklı7c5422aa456d
diff --git a/src/activitypub/inbox.js b/src/activitypub/inbox.jsindex b6ce91a6d7..d845e74c55 100644--- a/src/activitypub/inbox.js+++ b/src/activitypub/inbox.js@@ -249,8 +249,10 @@ inbox.update = async (req) => {const { generatedTitle } = await topics.getTopicFields(tid, ['generatedTitle']);if (generatedTitle && (!postData.title || !postData.title.trim())) {const newTitle = activitypub.helpers.generateTitle(postData.sourceContent || postData.content);- await topics.setTopicField(tid, 'title', newTitle);- await topics.setTopicField(tid, 'slug', `${tid}/${slugify(newTitle) || 'topic'}`);+ await topics.setTopicFields(tid, {+ title: newTitle,+ slug: `${tid}/${slugify(newTitle) || 'topic'}`,+ });}}break;