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

14 lines
352 B
TypeScript

import { isActivityPubUrlValid, isObjectValid } from './misc'
function isDislikeActivityValid (activity: any) {
return activity.type === 'Dislike' &&
isActivityPubUrlValid(activity.actor) &&
isObjectValid(activity.object)
}
// ---------------------------------------------------------------------------
export {
isDislikeActivityValid
}