refactor: prefix Mi for all entities (#11719)
* wip * wip * wip * wip * Update RepositoryModule.ts * wip * wip * wip * Revert "wip" This reverts commit c1c13b37d2aaf3c65bc148212da302b0eb7868bf.
This commit is contained in:
parent
9264ca336b
commit
792622aead
229 changed files with 1990 additions and 1990 deletions
|
@ -9,7 +9,7 @@ import chalk from 'chalk';
|
|||
import { IsNull } from 'typeorm';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import type { UsersRepository } from '@/models/index.js';
|
||||
import type { LocalUser, RemoteUser } from '@/models/entities/User.js';
|
||||
import type { MiLocalUser, MiRemoteUser } from '@/models/entities/User.js';
|
||||
import type { Config } from '@/config.js';
|
||||
import type Logger from '@/logger.js';
|
||||
import { UtilityService } from '@/core/UtilityService.js';
|
||||
|
@ -40,7 +40,7 @@ export class RemoteUserResolveService {
|
|||
}
|
||||
|
||||
@bindThis
|
||||
public async resolveUser(username: string, host: string | null): Promise<LocalUser | RemoteUser> {
|
||||
public async resolveUser(username: string, host: string | null): Promise<MiLocalUser | MiRemoteUser> {
|
||||
const usernameLower = username.toLowerCase();
|
||||
|
||||
if (host == null) {
|
||||
|
@ -51,7 +51,7 @@ export class RemoteUserResolveService {
|
|||
} else {
|
||||
return u;
|
||||
}
|
||||
}) as LocalUser;
|
||||
}) as MiLocalUser;
|
||||
}
|
||||
|
||||
host = this.utilityService.toPuny(host);
|
||||
|
@ -64,10 +64,10 @@ export class RemoteUserResolveService {
|
|||
} else {
|
||||
return u;
|
||||
}
|
||||
}) as LocalUser;
|
||||
}) as MiLocalUser;
|
||||
}
|
||||
|
||||
const user = await this.usersRepository.findOneBy({ usernameLower, host }) as RemoteUser | null;
|
||||
const user = await this.usersRepository.findOneBy({ usernameLower, host }) as MiRemoteUser | null;
|
||||
|
||||
const acctLower = `${usernameLower}@${host}`;
|
||||
|
||||
|
@ -86,7 +86,7 @@ export class RemoteUserResolveService {
|
|||
} else {
|
||||
return u;
|
||||
}
|
||||
})) as LocalUser;
|
||||
})) as MiLocalUser;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -132,7 +132,7 @@ export class RemoteUserResolveService {
|
|||
if (u == null) {
|
||||
throw new Error('user not found');
|
||||
} else {
|
||||
return u as LocalUser | RemoteUser;
|
||||
return u as MiLocalUser | MiRemoteUser;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue