From 15ea610f951b145e114e14ee6a599d6069714411 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 906bcb533..ea59730e4 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 0140811f0..50e7873cb 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