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

14 lines
352 B
TypeScript
Raw Normal View History

import { isActivityPubUrlValid, isObjectValid } from './misc'
2017-11-23 14:19:55 +01:00
function isDislikeActivityValid (activity: any) {
return activity.type === 'Dislike' &&
isActivityPubUrlValid(activity.actor) &&
isObjectValid(activity.object)
2017-11-23 14:19:55 +01:00
}
// ---------------------------------------------------------------------------
export {
isDislikeActivityValid
}