aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers/custom-validators')
-rw-r--r--server/helpers/custom-validators/activitypub/actor.ts6
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 @@
1import * as validator from 'validator' 1import * as validator from 'validator'
2import { CONSTRAINTS_FIELDS } from '../../../initializers' 2import { CONSTRAINTS_FIELDS } from '../../../initializers'
3import { isAccountNameValid } from '../accounts'
4import { exists } from '../misc' 3import { exists } from '../misc'
5import { isVideoChannelNameValid } from '../video-channels'
6import { isActivityPubUrlValid, isBaseActivityValid, setValidAttributedTo } from './misc' 4import { isActivityPubUrlValid, isBaseActivityValid, setValidAttributedTo } from './misc'
7 5
8function isActorEndpointsObjectValid (endpointObject: any) { 6function 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
35function isActorNameValid (name: string) {
36 return isAccountNameValid(name) || isVideoChannelNameValid(name)
37}
38
39function isActorPrivateKeyValid (privateKey: string) { 33function isActorPrivateKeyValid (privateKey: string) {
40 return exists(privateKey) && 34 return exists(privateKey) &&
41 typeof privateKey === 'string' && 35 typeof privateKey === 'string' &&