1
0
Fork 0
peertube/server/helpers/custom-validators/activitypub/undo.ts
Chocobozzz fadf619ad6
Save
2017-12-19 10:51:09 +01:00

16 lines
462 B
TypeScript

import { isAccountFollowActivityValid } from './actor'
import { isBaseActivityValid } from './misc'
import { isDislikeActivityValid, isLikeActivityValid } from './rate'
function isUndoActivityValid (activity: any) {
return isBaseActivityValid(activity, 'Undo') &&
(
isAccountFollowActivityValid(activity.object) ||
isLikeActivityValid(activity.object) ||
isDislikeActivityValid(activity.object)
)
}
export {
isUndoActivityValid
}