1
0
Fork 0
peertube/server/helpers/custom-validators/activitypub/flag.ts
2020-07-10 14:02:41 +02:00

14 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
}