mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 02:39:33 +02:00
Improve video torrent AP object validator
This commit is contained in:
parent
a077482fb7
commit
1d6e5dfc37
4 changed files with 19 additions and 20 deletions
|
@ -11,9 +11,9 @@ import { isUndoActivityValid } from './undo'
|
|||
import { isVideoCommentCreateActivityValid, isVideoCommentDeleteActivityValid } from './video-comments'
|
||||
import {
|
||||
isVideoFlagValid,
|
||||
isVideoTorrentCreateActivityValid,
|
||||
sanitizeAndCheckVideoTorrentCreateActivity,
|
||||
isVideoTorrentDeleteActivityValid,
|
||||
isVideoTorrentUpdateActivityValid
|
||||
sanitizeAndCheckVideoTorrentUpdateActivity
|
||||
} from './videos'
|
||||
import { isViewActivityValid } from './view'
|
||||
|
||||
|
@ -62,13 +62,13 @@ export {
|
|||
function checkCreateActivity (activity: any) {
|
||||
return isViewActivityValid(activity) ||
|
||||
isDislikeActivityValid(activity) ||
|
||||
isVideoTorrentCreateActivityValid(activity) ||
|
||||
sanitizeAndCheckVideoTorrentCreateActivity(activity) ||
|
||||
isVideoFlagValid(activity) ||
|
||||
isVideoCommentCreateActivityValid(activity)
|
||||
}
|
||||
|
||||
function checkUpdateActivity (activity: any) {
|
||||
return isVideoTorrentUpdateActivityValid(activity) ||
|
||||
return sanitizeAndCheckVideoTorrentUpdateActivity(activity) ||
|
||||
isActorUpdateActivityValid(activity)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue