aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/activitypub
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-01-12 12:18:11 +0100
committerChocobozzz <me@florianbigard.com>2018-01-12 12:18:11 +0100
commit38768a367bf41393128cc9476700b99022d7d92a (patch)
tree8ece292bd47296d6f310411985ccc251522ab68c /server/models/activitypub
parenta3fd560d11554073f0247f3785192cab920ae602 (diff)
downloadPeerTube-38768a367bf41393128cc9476700b99022d7d92a.tar.gz
PeerTube-38768a367bf41393128cc9476700b99022d7d92a.tar.zst
PeerTube-38768a367bf41393128cc9476700b99022d7d92a.zip
Fix lint
Diffstat (limited to 'server/models/activitypub')
-rw-r--r--server/models/activitypub/actor-follow.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/server/models/activitypub/actor-follow.ts b/server/models/activitypub/actor-follow.ts
index 435d22db5..ced481547 100644
--- a/server/models/activitypub/actor-follow.ts
+++ b/server/models/activitypub/actor-follow.ts
@@ -2,9 +2,8 @@ import * as Bluebird from 'bluebird'
2import { values } from 'lodash' 2import { values } from 'lodash'
3import * as Sequelize from 'sequelize' 3import * as Sequelize from 'sequelize'
4import { 4import {
5 AfterCreate, AfterDestroy, AfterUpdate, 5 AfterCreate, AfterDestroy, AfterUpdate, AllowNull, BelongsTo, Column, CreatedAt, DataType, Default, ForeignKey, IsInt, Max, Model,
6 AllowNull, BelongsTo, Column, CreatedAt, DataType, Default, ForeignKey, IsInt, Max, Model, Table, 6 Table, UpdatedAt
7 UpdatedAt
8} from 'sequelize-typescript' 7} from 'sequelize-typescript'
9import { FollowState } from '../../../shared/models/actors' 8import { FollowState } from '../../../shared/models/actors'
10import { AccountFollow } from '../../../shared/models/actors/follow.model' 9import { AccountFollow } from '../../../shared/models/actors/follow.model'
@@ -83,7 +82,7 @@ export class ActorFollowModel extends Model<ActorFollowModel> {
83 @AfterCreate 82 @AfterCreate
84 @AfterUpdate 83 @AfterUpdate
85 static incrementFollowerAndFollowingCount (instance: ActorFollowModel) { 84 static incrementFollowerAndFollowingCount (instance: ActorFollowModel) {
86 if (instance.state !== 'accepted') return 85 if (instance.state !== 'accepted') return undefined
87 86
88 return Promise.all([ 87 return Promise.all([
89 ActorModel.incrementFollows(instance.actorId, 'followingCount', 1), 88 ActorModel.incrementFollows(instance.actorId, 'followingCount', 1),