1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 18:29:27 +02:00

Update follower/following counts

This commit is contained in:
Chocobozzz 2018-01-12 11:47:45 +01:00
parent 6502c3d43e
commit 32b2b43c06
No known key found for this signature in database
GPG key ID: 583A612D890159BE
8 changed files with 108 additions and 1 deletions

View file

@ -51,6 +51,9 @@ async function follow (actor: ActorModel, targetActorURL: string) {
transaction: t
})
actorFollow.ActorFollower = actor
actorFollow.ActorFollowing = targetActor
if (actorFollow.state !== 'accepted') {
actorFollow.state = 'accepted'
await actorFollow.save({ transaction: t })