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