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

14 lines
336 B
TypeScript

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