diff options
author | Chocobozzz <me@florianbigard.com> | 2018-01-03 17:25:47 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-01-03 17:35:00 +0100 |
commit | cf117aaafc1e9ae1ab4c388fc5d2e5ba9349efee (patch) | |
tree | ab51ac2f2c7ec8dfc7fcde99565a4430874da599 /server/helpers | |
parent | 265ba139ebf56bbdc1c65f6ea4f367774c691fc0 (diff) | |
download | PeerTube-cf117aaafc1e9ae1ab4c388fc5d2e5ba9349efee.tar.gz PeerTube-cf117aaafc1e9ae1ab4c388fc5d2e5ba9349efee.tar.zst PeerTube-cf117aaafc1e9ae1ab4c388fc5d2e5ba9349efee.zip |
Add avatar in comments
Diffstat (limited to 'server/helpers')
-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' && |