diff options
Diffstat (limited to 'server/models/activitypub')
-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 78a65a0ff..920c83d88 100644 --- a/server/models/activitypub/actor-follow.ts +++ b/server/models/activitypub/actor-follow.ts | |||
@@ -307,7 +307,7 @@ export class ActorFollowModel extends Model<ActorFollowModel> { | |||
307 | private static incrementScores (inboxUrls: string[], value: number, t: Sequelize.Transaction) { | 307 | private static incrementScores (inboxUrls: string[], value: number, t: Sequelize.Transaction) { |
308 | const inboxUrlsString = inboxUrls.map(url => `'${url}'`).join(',') | 308 | const inboxUrlsString = inboxUrls.map(url => `'${url}'`).join(',') |
309 | 309 | ||
310 | const query = 'UPDATE "actorFollow" SET "score" = "score" +' + value + ' ' + | 310 | const query = `UPDATE "actorFollow" SET "score" = LEAST("score" + ${value}, ${ACTOR_FOLLOW_SCORE.MAX}) ` + |
311 | 'WHERE id IN (' + | 311 | 'WHERE id IN (' + |
312 | 'SELECT "actorFollow"."id" FROM "actorFollow" ' + | 312 | 'SELECT "actorFollow"."id" FROM "actorFollow" ' + |
313 | 'INNER JOIN "actor" ON "actor"."id" = "actorFollow"."actorId" ' + | 313 | 'INNER JOIN "actor" ON "actor"."id" = "actorFollow"."actorId" ' + |