From ad1a86113b7f562b6b25f7705d92a80473317aea Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 8 Apr 2018 23:29:27 +0900 Subject: [PATCH] Fix bug --- src/models/user.ts | 1 + src/remote/activitypub/resolve-person.ts | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/src/models/user.ts b/src/models/user.ts index 906bcb533b..ea59730e4d 100644 --- a/src/models/user.ts +++ b/src/models/user.ts @@ -12,6 +12,7 @@ const User = db.get('users'); User.createIndex('username'); User.createIndex('token'); +User.createIndex('uri', { sparse: true, unique: true }); export default User; diff --git a/src/remote/activitypub/resolve-person.ts b/src/remote/activitypub/resolve-person.ts index 0140811f0a..50e7873cbd 100644 --- a/src/remote/activitypub/resolve-person.ts +++ b/src/remote/activitypub/resolve-person.ts @@ -12,6 +12,14 @@ export default async (value: string | IObject, verifier?: string): Promise