X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Factivitypub%2Fprocess-accept.ts;h=9e0cd4032df31dccd63c4dbd0ff11b432954be9d;hb=21e0727a84734cb0c81c1c9bb22a49b13e46fe5f;hp=37e42bd3a94c4e9959313260bab18eddd173fc79;hpb=7a7724e66e4533523083e7336cd0d0c747c4a33b;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/activitypub/process-accept.ts b/server/lib/activitypub/process-accept.ts index 37e42bd3a..9e0cd4032 100644 --- a/server/lib/activitypub/process-accept.ts +++ b/server/lib/activitypub/process-accept.ts @@ -7,7 +7,7 @@ async function processAcceptActivity (activity: ActivityAccept, inboxAccount?: A const targetAccount = await db.Account.loadByUrl(activity.actor) - return processFollow(inboxAccount, targetAccount) + return processAccept(inboxAccount, targetAccount) } // --------------------------------------------------------------------------- @@ -18,10 +18,10 @@ export { // --------------------------------------------------------------------------- -async function processFollow (account: AccountInstance, targetAccount: AccountInstance) { +async function processAccept (account: AccountInstance, targetAccount: AccountInstance) { const follow = await db.AccountFollow.loadByAccountAndTarget(account.id, targetAccount.id) if (!follow) throw new Error('Cannot find associated follow.') follow.set('state', 'accepted') - return follow.save() + await follow.save() }