fix: use correct variable

Fixes an error introduced in commit 7a80015225.
This commit is contained in:
Johann150 2022-08-10 23:59:35 +02:00 committed by Francis Dinh
parent 20cd5bb815
commit 753e252ff6

View file

@ -14,7 +14,7 @@ const logger = remoteLogger.createSubLogger('resolve-user');
export async function resolveUser(username: string, idnHost: string | null): Promise<User> {
const usernameLower = username.toLowerCase();
if (host == null) {
if (idnHost == null) {
logger.info(`return local user: ${usernameLower}`);
return await Users.findOneBy({ usernameLower, host: IsNull() }).then(u => {
if (u == null) {