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

15 lines
382 B
TypeScript

import { isActivityPubUrlValid } from './misc'
import { isAbuseReasonValid } from '../abuses'
function isFlagActivityValid (activity: any) {
return activity.type === 'Flag' &&
isAbuseReasonValid(activity.content) &&
isActivityPubUrlValid(activity.object)
}
// ---------------------------------------------------------------------------
export {
isFlagActivityValid
}