Limit maximum actor follow score
This commit is contained in:
parent
b3d1054e86
commit
327b331889
1 changed files with 1 additions and 1 deletions
|
@ -486,7 +486,7 @@ export class ActorFollowModel extends Model<ActorFollowModel> {
|
|||
const me = await getServerActor()
|
||||
const serverIdsString = createSafeIn(ActorFollowModel, serverIds)
|
||||
|
||||
const query = `UPDATE "actorFollow" SET "score" = "score" + ${value} ` +
|
||||
const query = `UPDATE "actorFollow" SET "score" = LEAST("score" + ${value}, ${ACTOR_FOLLOW_SCORE.MAX}) ` +
|
||||
'WHERE id IN (' +
|
||||
'SELECT "actorFollow"."id" FROM "actorFollow" ' +
|
||||
'INNER JOIN "actor" ON "actor"."id" = "actorFollow"."targetActorId" ' +
|
||||
|
|
Loading…
Reference in a new issue