PeerTube/server/helpers/custom-validators/activitypub/rate.ts
Chocobozzz 848f499def
Prepare Dislike/Flag/View fixes
For now we Create these activities, but we should just send them
directly.

This fix handles correctly direct Dislikes/Flags/Views, we'll implement
the sending correctly these activities in the next peertube version
2019-01-15 14:45:09 +01:00

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
}