diff options
Diffstat (limited to 'server/lib/activitypub/process-accept.ts')
-rw-r--r-- | server/lib/activitypub/process-accept.ts | 6 |
1 files changed, 3 insertions, 3 deletions
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 | |||
7 | 7 | ||
8 | const targetAccount = await db.Account.loadByUrl(activity.actor) | 8 | const targetAccount = await db.Account.loadByUrl(activity.actor) |
9 | 9 | ||
10 | return processFollow(inboxAccount, targetAccount) | 10 | return processAccept(inboxAccount, targetAccount) |
11 | } | 11 | } |
12 | 12 | ||
13 | // --------------------------------------------------------------------------- | 13 | // --------------------------------------------------------------------------- |
@@ -18,10 +18,10 @@ export { | |||
18 | 18 | ||
19 | // --------------------------------------------------------------------------- | 19 | // --------------------------------------------------------------------------- |
20 | 20 | ||
21 | async function processFollow (account: AccountInstance, targetAccount: AccountInstance) { | 21 | async function processAccept (account: AccountInstance, targetAccount: AccountInstance) { |
22 | const follow = await db.AccountFollow.loadByAccountAndTarget(account.id, targetAccount.id) | 22 | const follow = await db.AccountFollow.loadByAccountAndTarget(account.id, targetAccount.id) |
23 | if (!follow) throw new Error('Cannot find associated follow.') | 23 | if (!follow) throw new Error('Cannot find associated follow.') |
24 | 24 | ||
25 | follow.set('state', 'accepted') | 25 | follow.set('state', 'accepted') |
26 | return follow.save() | 26 | await follow.save() |
27 | } | 27 | } |