mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Improve AP validation for Notes
This commit is contained in:
@@ -43,13 +43,14 @@ function isActivityPubVideoDurationValid (value: string) {
|
||||
}
|
||||
|
||||
function sanitizeAndCheckVideoTorrentObject (video: any) {
|
||||
if (video.type !== 'Video') return false
|
||||
|
||||
if (!setValidRemoteTags(video)) return false
|
||||
if (!setValidRemoteVideoUrls(video)) return false
|
||||
if (!setRemoteVideoTruncatedContent(video)) return false
|
||||
if (!setValidAttributedTo(video)) return false
|
||||
|
||||
return video.type === 'Video' &&
|
||||
isActivityPubUrlValid(video.id) &&
|
||||
return isActivityPubUrlValid(video.id) &&
|
||||
isVideoNameValid(video.name) &&
|
||||
isActivityPubVideoDurationValid(video.duration) &&
|
||||
isUUIDValid(video.uuid) &&
|
||||
|
||||
Reference in New Issue
Block a user