diff options
author | Chocobozzz <me@florianbigard.com> | 2019-02-26 10:55:40 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-03-18 11:17:59 +0100 |
commit | 418d092afa81e2c8fe8ac6838fc4b5eb0af6a782 (patch) | |
tree | 5e9bc5604fd5d66a006cfebb7acdbdd5486e5d1e /server/helpers/custom-validators/activitypub/activity.ts | |
parent | b427febb4d5cebf03b815bca2c59af6e82491569 (diff) | |
download | PeerTube-418d092afa81e2c8fe8ac6838fc4b5eb0af6a782.tar.gz PeerTube-418d092afa81e2c8fe8ac6838fc4b5eb0af6a782.tar.zst PeerTube-418d092afa81e2c8fe8ac6838fc4b5eb0af6a782.zip |
Playlist server API
Diffstat (limited to 'server/helpers/custom-validators/activitypub/activity.ts')
-rw-r--r-- | server/helpers/custom-validators/activitypub/activity.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/server/helpers/custom-validators/activitypub/activity.ts b/server/helpers/custom-validators/activitypub/activity.ts index b24590d9d..e0d170d9d 100644 --- a/server/helpers/custom-validators/activitypub/activity.ts +++ b/server/helpers/custom-validators/activitypub/activity.ts | |||
@@ -9,6 +9,7 @@ import { isViewActivityValid } from './view' | |||
9 | import { exists } from '../misc' | 9 | import { exists } from '../misc' |
10 | import { isCacheFileObjectValid } from './cache-file' | 10 | import { isCacheFileObjectValid } from './cache-file' |
11 | import { isFlagActivityValid } from './flag' | 11 | import { isFlagActivityValid } from './flag' |
12 | import { isPlaylistObjectValid } from './playlist' | ||
12 | 13 | ||
13 | function isRootActivityValid (activity: any) { | 14 | function isRootActivityValid (activity: any) { |
14 | return Array.isArray(activity['@context']) && ( | 15 | return Array.isArray(activity['@context']) && ( |
@@ -78,6 +79,7 @@ function checkCreateActivity (activity: any) { | |||
78 | isViewActivityValid(activity.object) || | 79 | isViewActivityValid(activity.object) || |
79 | isDislikeActivityValid(activity.object) || | 80 | isDislikeActivityValid(activity.object) || |
80 | isFlagActivityValid(activity.object) || | 81 | isFlagActivityValid(activity.object) || |
82 | isPlaylistObjectValid(activity.object) || | ||
81 | 83 | ||
82 | isCacheFileObjectValid(activity.object) || | 84 | isCacheFileObjectValid(activity.object) || |
83 | sanitizeAndCheckVideoCommentObject(activity.object) || | 85 | sanitizeAndCheckVideoCommentObject(activity.object) || |
@@ -89,6 +91,7 @@ function checkUpdateActivity (activity: any) { | |||
89 | return isBaseActivityValid(activity, 'Update') && | 91 | return isBaseActivityValid(activity, 'Update') && |
90 | ( | 92 | ( |
91 | isCacheFileObjectValid(activity.object) || | 93 | isCacheFileObjectValid(activity.object) || |
94 | isPlaylistObjectValid(activity.object) || | ||
92 | sanitizeAndCheckVideoTorrentObject(activity.object) || | 95 | sanitizeAndCheckVideoTorrentObject(activity.object) || |
93 | sanitizeAndCheckActorObject(activity.object) | 96 | sanitizeAndCheckActorObject(activity.object) |
94 | ) | 97 | ) |