upd: make sure system users get the values properly set
This commit is contained in:
parent
ed95e8168c
commit
2eaff3388f
|
@ -9,6 +9,8 @@ export class idCheck1724044488000 {
|
|||
async up(queryRunner) {
|
||||
await queryRunner.query(`ALTER TABLE "user" ADD "idCheckRequired" boolean NOT NULL DEFAULT false`);
|
||||
await queryRunner.query(`ALTER TABLE "user" ADD "idVerified" boolean NOT NULL DEFAULT false`);
|
||||
await queryRunner.query(`UPDATE "user" SET "idVerified" = true WHERE "usernameLower" = 'instance.actor' AND "idVerified" = false`);
|
||||
await queryRunner.query(`UPDATE "user" SET "idVerified" = true WHERE "usernameLower" = 'relay.actor' AND "idVerified" = false`);
|
||||
}
|
||||
|
||||
async down(queryRunner) {
|
||||
|
|
|
@ -63,6 +63,8 @@ export class CreateSystemUserService {
|
|||
isExplorable: false,
|
||||
approved: true,
|
||||
isBot: true,
|
||||
idCheckRequired: false,
|
||||
idVerified: true,
|
||||
}).then(x => transactionalEntityManager.findOneByOrFail(MiUser, x.identifiers[0]));
|
||||
|
||||
await transactionalEntityManager.insert(MiUserKeypair, {
|
||||
|
|
Loading…
Reference in New Issue