diff options
Diffstat (limited to 'server/helpers/custom-validators')
-rw-r--r-- | server/helpers/custom-validators/activitypub/actor.ts | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/server/helpers/custom-validators/activitypub/actor.ts b/server/helpers/custom-validators/activitypub/actor.ts index 8820bb2a4..e1a4b5b8f 100644 --- a/server/helpers/custom-validators/activitypub/actor.ts +++ b/server/helpers/custom-validators/activitypub/actor.ts | |||
@@ -1,8 +1,6 @@ | |||
1 | import * as validator from 'validator' | 1 | import * as validator from 'validator' |
2 | import { CONSTRAINTS_FIELDS } from '../../../initializers' | 2 | import { CONSTRAINTS_FIELDS } from '../../../initializers' |
3 | import { isAccountNameValid } from '../accounts' | ||
4 | import { exists } from '../misc' | 3 | import { exists } from '../misc' |
5 | import { isVideoChannelNameValid } from '../video-channels' | ||
6 | import { isActivityPubUrlValid, isBaseActivityValid, setValidAttributedTo } from './misc' | 4 | import { isActivityPubUrlValid, isBaseActivityValid, setValidAttributedTo } from './misc' |
7 | 5 | ||
8 | function isActorEndpointsObjectValid (endpointObject: any) { | 6 | function isActorEndpointsObjectValid (endpointObject: any) { |
@@ -32,10 +30,6 @@ function isActorPreferredUsernameValid (preferredUsername: string) { | |||
32 | return exists(preferredUsername) && validator.matches(preferredUsername, actorNameRegExp) | 30 | return exists(preferredUsername) && validator.matches(preferredUsername, actorNameRegExp) |
33 | } | 31 | } |
34 | 32 | ||
35 | function isActorNameValid (name: string) { | ||
36 | return isAccountNameValid(name) || isVideoChannelNameValid(name) | ||
37 | } | ||
38 | |||
39 | function isActorPrivateKeyValid (privateKey: string) { | 33 | function isActorPrivateKeyValid (privateKey: string) { |
40 | return exists(privateKey) && | 34 | return exists(privateKey) && |
41 | typeof privateKey === 'string' && | 35 | typeof privateKey === 'string' && |