summaryrefslogtreecommitdiff
path: root/src/remote
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-05-07 04:26:45 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-05-07 04:26:45 +0900
commit4955df3911146baf6f0ea8ba2a3b369932655057 (patch)
tree86a25a5976f8449a7034ab61d28ef8221e051902 /src/remote
parent良い感じに (diff)
downloadmisskey-4955df3911146baf6f0ea8ba2a3b369932655057.tar.gz
misskey-4955df3911146baf6f0ea8ba2a3b369932655057.tar.bz2
misskey-4955df3911146baf6f0ea8ba2a3b369932655057.zip
oops
Diffstat (limited to 'src/remote')
-rw-r--r--src/remote/resolve-user.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/remote/resolve-user.ts b/src/remote/resolve-user.ts
index 7acbf085a6..c612a8c949 100644
--- a/src/remote/resolve-user.ts
+++ b/src/remote/resolve-user.ts
@@ -6,6 +6,11 @@ import { createPerson } from './activitypub/models/person';
export default async (username, _host, option?): Promise<IUser> => {
const usernameLower = username.toLowerCase();
+
+ if (_host == null) {
+ return await User.findOne({ usernameLower });
+ }
+
const hostAscii = toASCII(_host).toLowerCase();
const host = toUnicode(hostAscii);