aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-01-03 17:25:47 +0100
committerChocobozzz <me@florianbigard.com>2018-01-03 17:35:00 +0100
commitcf117aaafc1e9ae1ab4c388fc5d2e5ba9349efee (patch)
treeab51ac2f2c7ec8dfc7fcde99565a4430874da599 /server/helpers/custom-validators
parent265ba139ebf56bbdc1c65f6ea4f367774c691fc0 (diff)
downloadPeerTube-cf117aaafc1e9ae1ab4c388fc5d2e5ba9349efee.tar.gz
PeerTube-cf117aaafc1e9ae1ab4c388fc5d2e5ba9349efee.tar.zst
PeerTube-cf117aaafc1e9ae1ab4c388fc5d2e5ba9349efee.zip
Add avatar in comments
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' &&