From 0f06c4de69e2a2af04da6447a4cc0f9f99b5f3d8 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 11 May 2020 11:06:12 +0200 Subject: Add unique key on actor preferredUsername --- server/models/activitypub/actor.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'server/models') diff --git a/server/models/activitypub/actor.ts b/server/models/activitypub/actor.ts index e547d2c0c..34bc91706 100644 --- a/server/models/activitypub/actor.ts +++ b/server/models/activitypub/actor.ts @@ -123,13 +123,13 @@ export const unusedActorAttributesForAPI = [ } } }, - // { - // fields: [ 'preferredUsername' ], - // unique: true, - // where: { - // serverId: null - // } - // }, + { + fields: [ 'preferredUsername' ], + unique: true, + where: { + serverId: null + } + }, { fields: [ 'inboxUrl', 'sharedInboxUrl' ] }, -- cgit v1.2.3