diff options
author | Chocobozzz <me@florianbigard.com> | 2017-12-28 11:16:08 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2017-12-28 11:16:08 +0100 |
commit | da854ddd502cd70685ef779c673b9e63757b8aa0 (patch) | |
tree | 21501d170cceaa044a5f23449cbd2eb47fd6415d /server/helpers/custom-validators/activitypub | |
parent | f40bbe3146553ef45515ee6b6d93ce6028f045ca (diff) | |
download | PeerTube-da854ddd502cd70685ef779c673b9e63757b8aa0.tar.gz PeerTube-da854ddd502cd70685ef779c673b9e63757b8aa0.tar.zst PeerTube-da854ddd502cd70685ef779c673b9e63757b8aa0.zip |
Propagate old comment on new follow
Diffstat (limited to 'server/helpers/custom-validators/activitypub')
-rw-r--r-- | server/helpers/custom-validators/activitypub/actor.ts | 3 | ||||
-rw-r--r-- | server/helpers/custom-validators/activitypub/announce.ts | 1 | ||||
-rw-r--r-- | server/helpers/custom-validators/activitypub/index.ts | 8 |
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 | ||
48 | function isRemoteActorValid (remoteActor: any) { | 48 | function 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' | |||
2 | import { isVideoTorrentCreateActivityValid } from './videos' | 2 | import { isVideoTorrentCreateActivityValid } from './videos' |
3 | 3 | ||
4 | function isAnnounceActivityValid (activity: any) { | 4 | function 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 @@ | |||
1 | export * from './actor' | ||
2 | export * from './activity' | ||
3 | export * from './misc' | ||
4 | export * from './signature' | ||
5 | export * from './undo' | ||
6 | export * from './video-channels' | ||
7 | export * from './videos' | ||
8 | export * from './view' | ||