mirror of https://github.com/Chocobozzz/PeerTube
14 lines
424 B
TypeScript
14 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
|
||
|
}
|