aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/activitypub/actor.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/activitypub/actor.ts')
-rw-r--r--server/models/activitypub/actor.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/server/models/activitypub/actor.ts b/server/models/activitypub/actor.ts
index 17f69f7a7..b7be9c32c 100644
--- a/server/models/activitypub/actor.ts
+++ b/server/models/activitypub/actor.ts
@@ -264,6 +264,16 @@ export class ActorModel extends Model<ActorModel> {
264 return ActorModel.scope(ScopeNames.FULL).findOne(query) 264 return ActorModel.scope(ScopeNames.FULL).findOne(query)
265 } 265 }
266 266
267 static incrementFollows (id: number, column: 'followersCount' | 'followingCount', by: number) {
268 // FIXME: typings
269 return (ActorModel as any).increment(column, {
270 by,
271 where: {
272 id
273 }
274 })
275 }
276
267 toFormattedJSON () { 277 toFormattedJSON () {
268 let avatar: Avatar = null 278 let avatar: Avatar = null
269 if (this.Avatar) { 279 if (this.Avatar) {