PeerTube/server/helpers/custom-validators/activitypub/announce.ts

14 lines
321 B
TypeScript

import { isBaseActivityValid } from './misc'
import { isVideoTorrentCreateActivityValid } from './videos'
function isAnnounceActivityValid (activity: any) {
return isBaseActivityValid(activity, 'Announce') &&
(
isVideoTorrentCreateActivityValid(activity.object)
)
}
export {
isAnnounceActivityValid
}