From de4fe9fdba6e12a8cfa2fe8438de53944d12fe3f Mon Sep 17 00:00:00 2001 From: ale Date: Thu, 31 Oct 2024 20:13:41 +0100 Subject: [PATCH] refactor issue --- lib/apexcustom.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/apexcustom.js b/lib/apexcustom.js index 1297c44..5cb1b18 100644 --- a/lib/apexcustom.js +++ b/lib/apexcustom.js @@ -23,11 +23,11 @@ module.exports = (app, apex, client) => { && msg.activity.type) { const type = msg.activity.type.toLowerCase() if (type === 'follow' && msg.recipient.type.toLowerCase() === 'person') { - const follow = await apex.acceptFollow(msg.recipient, msg.activity), - act = await apex.buildActivity('Accept', apex.utils.usernameToIRI(constant.nick), ['https://www.w3.org/ns/activitystreams#Public'].concat([msg.actor.id]), { - actor: msg.recipient, - object: msg.activity - }) + await apex.acceptFollow(msg.recipient, msg.activity) + const act = await apex.buildActivity('Accept', apex.utils.usernameToIRI(constant.nick), ['https://www.w3.org/ns/activitystreams#Public'].concat([msg.actor.id]), { + actor: msg.recipient, + object: msg.activity + }) await apex.addToOutbox(await apex.store.getObject(apex.utils.usernameToIRI(constant.nick), true), act) } if (type === 'create' && msg.object.type.toLowerCase() === 'note' && msg.actor.preferredUsername && msg.object.content) {