1
0
Fork 0
peertube/server/helpers/custom-validators/activitypub/announce.ts

16 lines
428 B
TypeScript
Raw Normal View History

2017-11-20 03:43:39 -05:00
import { isBaseActivityValid } from './misc'
import { isVideoTorrentAddActivityValid } from './videos'
import { isVideoChannelCreateActivityValid } from './video-channels'
function isAnnounceValid (activity: any) {
return isBaseActivityValid(activity, 'Announce') &&
(
isVideoChannelCreateActivityValid(activity.object) ||
isVideoTorrentAddActivityValid(activity.object)
)
}
export {
isAnnounceValid
}