Merge pull request #96 from DarkView/k30_fixNicknameStorage

[K30] Change nickname storage to the intended 10
This commit is contained in:
Miikka 2020-07-29 19:57:53 +03:00 committed by GitHub
commit dc25b67672
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,7 +2,6 @@ import { BaseGuildRepository } from "./BaseGuildRepository";
import { getRepository, In, Repository } from "typeorm";
import { NicknameHistoryEntry } from "./entities/NicknameHistoryEntry";
import { MINUTES, SECONDS } from "../utils";
import { MAX_USERNAME_ENTRIES_PER_USER } from "./UsernameHistory";
import { isAPI } from "../globals";
import { cleanupNicknames } from "./cleanup/nicknames";
@ -65,7 +64,7 @@ export class GuildNicknameHistory extends BaseGuildRepository {
.where("guild_id = :guildId", { guildId: this.guildId })
.andWhere("user_id = :userId", { userId })
.orderBy("id", "DESC")
.skip(MAX_USERNAME_ENTRIES_PER_USER)
.skip(MAX_NICKNAME_ENTRIES_PER_USER)
.take(99_999)
.getMany();