]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/activitypub/process/process-accept.ts
Fix bad to/cc when undo dislike
[github/Chocobozzz/PeerTube.git] / server / lib / activitypub / process / process-accept.ts
index e159c41b53f51a7abf7ac78b911c86b0ff3e71a3..73c6cb27913d9fc1089d84196667f436dfb17d68 100644 (file)
@@ -1,6 +1,7 @@
 import { ActivityAccept } from '../../../../shared/models/activitypub/activity'
 import { database as db } from '../../../initializers'
 import { AccountInstance } from '../../../models/account/account-interface'
+import { addFetchOutboxJob } from '../fetch'
 
 async function processAcceptActivity (activity: ActivityAccept, inboxAccount?: AccountInstance) {
   if (inboxAccount === undefined) throw new Error('Need to accept on explicit inbox.')
@@ -24,4 +25,5 @@ async function processAccept (account: AccountInstance, targetAccount: AccountIn
 
   follow.set('state', 'accepted')
   await follow.save()
+  await addFetchOutboxJob(targetAccount, undefined)
 }