diff options
Diffstat (limited to 'server/models')
-rw-r--r-- | server/models/activitypub/actor-follow.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/models/activitypub/actor-follow.ts b/server/models/activitypub/actor-follow.ts index 99a5fd117..51b09e09b 100644 --- a/server/models/activitypub/actor-follow.ts +++ b/server/models/activitypub/actor-follow.ts | |||
@@ -486,7 +486,7 @@ export class ActorFollowModel extends Model<ActorFollowModel> { | |||
486 | const me = await getServerActor() | 486 | const me = await getServerActor() |
487 | const serverIdsString = createSafeIn(ActorFollowModel, serverIds) | 487 | const serverIdsString = createSafeIn(ActorFollowModel, serverIds) |
488 | 488 | ||
489 | const query = `UPDATE "actorFollow" SET "score" = "score" + ${value} ` + | 489 | const query = `UPDATE "actorFollow" SET "score" = LEAST("score" + ${value}, ${ACTOR_FOLLOW_SCORE.MAX}) ` + |
490 | 'WHERE id IN (' + | 490 | 'WHERE id IN (' + |
491 | 'SELECT "actorFollow"."id" FROM "actorFollow" ' + | 491 | 'SELECT "actorFollow"."id" FROM "actorFollow" ' + |
492 | 'INNER JOIN "actor" ON "actor"."id" = "actorFollow"."targetActorId" ' + | 492 | 'INNER JOIN "actor" ON "actor"."id" = "actorFollow"."targetActorId" ' + |