mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 18:29:27 +02:00
Add new follow, mention and user registered notifs
This commit is contained in:
parent
dc13348070
commit
f7cc67b455
25 changed files with 899 additions and 57 deletions
|
@ -2,6 +2,7 @@ import { ActivityAccept } from '../../../../shared/models/activitypub'
|
|||
import { ActorModel } from '../../../models/activitypub/actor'
|
||||
import { ActorFollowModel } from '../../../models/activitypub/actor-follow'
|
||||
import { addFetchOutboxJob } from '../actor'
|
||||
import { Notifier } from '../../notifier'
|
||||
|
||||
async function processAcceptActivity (activity: ActivityAccept, targetActor: ActorModel, inboxActor?: ActorModel) {
|
||||
if (inboxActor === undefined) throw new Error('Need to accept on explicit inbox.')
|
||||
|
@ -24,6 +25,7 @@ async function processAccept (actor: ActorModel, targetActor: ActorModel) {
|
|||
if (follow.state !== 'accepted') {
|
||||
follow.set('state', 'accepted')
|
||||
await follow.save()
|
||||
|
||||
await addFetchOutboxJob(targetActor)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue