1
0
Fork 0
peertube/server/helpers/custom-validators/activitypub/view.ts
2017-11-27 19:40:53 +01:00

13 lines
424 B
TypeScript

import { isActivityPubUrlValid, isBaseActivityValid } from './misc'
function isViewActivityValid (activity: any) {
return isBaseActivityValid(activity, 'Create') &&
activity.object.type === 'View' &&
isActivityPubUrlValid(activity.object.actor) &&
isActivityPubUrlValid(activity.object.object)
}
// ---------------------------------------------------------------------------
export {
isViewActivityValid
}