fix: primitives 25-33: proper local instance checks

This commit is contained in:
Julia Johannesen 2024-11-14 22:01:22 -05:00
parent 74565f67f7
commit 5764fa55cb
No known key found for this signature in database
GPG key ID: 4A1377AF3E7FBC46
6 changed files with 20 additions and 10 deletions

View file

@ -54,9 +54,9 @@ export class RemoteUserResolveService {
}) as MiLocalUser;
}
host = this.utilityService.toPuny(host);
host = this.utilityService.punyHost(host);
if (this.config.host === host) {
if (host === this.utilityService.toPuny(this.config.host)) {
this.logger.info(`return local user: ${usernameLower}`);
return await this.usersRepository.findOneBy({ usernameLower, host: IsNull() }).then(u => {
if (u == null) {