aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2017-12-28 11:16:08 +0100
committerChocobozzz <me@florianbigard.com>2017-12-28 11:16:08 +0100
commitda854ddd502cd70685ef779c673b9e63757b8aa0 (patch)
tree21501d170cceaa044a5f23449cbd2eb47fd6415d /server/helpers/custom-validators
parentf40bbe3146553ef45515ee6b6d93ce6028f045ca (diff)
downloadPeerTube-da854ddd502cd70685ef779c673b9e63757b8aa0.tar.gz
PeerTube-da854ddd502cd70685ef779c673b9e63757b8aa0.tar.zst
PeerTube-da854ddd502cd70685ef779c673b9e63757b8aa0.zip
Propagate old comment on new follow
Diffstat (limited to 'server/helpers/custom-validators')
-rw-r--r--server/helpers/custom-validators/activitypub/actor.ts3
-rw-r--r--server/helpers/custom-validators/activitypub/announce.ts1
-rw-r--r--server/helpers/custom-validators/activitypub/index.ts8
3 files changed, 2 insertions, 10 deletions
diff --git a/server/helpers/custom-validators/activitypub/actor.ts b/server/helpers/custom-validators/activitypub/actor.ts
index ec8da3350..630bace30 100644
--- a/server/helpers/custom-validators/activitypub/actor.ts
+++ b/server/helpers/custom-validators/activitypub/actor.ts
@@ -46,7 +46,8 @@ function isActorPrivateKeyValid (privateKey: string) {
46} 46}
47 47
48function isRemoteActorValid (remoteActor: any) { 48function isRemoteActorValid (remoteActor: any) {
49 return isActivityPubUrlValid(remoteActor.id) && 49 return exists(remoteActor) &&
50 isActivityPubUrlValid(remoteActor.id) &&
50 isActorTypeValid(remoteActor.type) && 51 isActorTypeValid(remoteActor.type) &&
51 isActivityPubUrlValid(remoteActor.following) && 52 isActivityPubUrlValid(remoteActor.following) &&
52 isActivityPubUrlValid(remoteActor.followers) && 53 isActivityPubUrlValid(remoteActor.followers) &&
diff --git a/server/helpers/custom-validators/activitypub/announce.ts b/server/helpers/custom-validators/activitypub/announce.ts
index 1baea4f60..7dd1d6988 100644
--- a/server/helpers/custom-validators/activitypub/announce.ts
+++ b/server/helpers/custom-validators/activitypub/announce.ts
@@ -2,7 +2,6 @@ import { isActivityPubUrlValid, isBaseActivityValid } from './misc'
2import { isVideoTorrentCreateActivityValid } from './videos' 2import { isVideoTorrentCreateActivityValid } from './videos'
3 3
4function isAnnounceActivityValid (activity: any) { 4function isAnnounceActivityValid (activity: any) {
5 console.log(activity)
6 return isBaseActivityValid(activity, 'Announce') && 5 return isBaseActivityValid(activity, 'Announce') &&
7 ( 6 (
8 isVideoTorrentCreateActivityValid(activity.object) || 7 isVideoTorrentCreateActivityValid(activity.object) ||
diff --git a/server/helpers/custom-validators/activitypub/index.ts b/server/helpers/custom-validators/activitypub/index.ts
deleted file mode 100644
index ba411f1c6..000000000
--- a/server/helpers/custom-validators/activitypub/index.ts
+++ /dev/null
@@ -1,8 +0,0 @@
1export * from './actor'
2export * from './activity'
3export * from './misc'
4export * from './signature'
5export * from './undo'
6export * from './video-channels'
7export * from './videos'
8export * from './view'