mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-26 20:07:33 -07:00
fix self host detection (#3201)
This commit is contained in:
parent
a254dcf8ef
commit
be4e80b7f5
1 changed files with 4 additions and 1 deletions
|
@ -16,10 +16,13 @@ export default async (username: string, _host: string, option?: any, resync?: bo
|
|||
return await User.findOne({ usernameLower, host: null });
|
||||
}
|
||||
|
||||
const configHostAscii = toASCII(config.host).toLowerCase();
|
||||
const configHost = toUnicode(configHostAscii);
|
||||
|
||||
const hostAscii = toASCII(_host).toLowerCase();
|
||||
const host = toUnicode(hostAscii);
|
||||
|
||||
if (config.host == host) {
|
||||
if (configHost == host) {
|
||||
log(`return local user: ${usernameLower}`);
|
||||
return await User.findOne({ usernameLower, host: null });
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue