mirror of https://github.com/Chocobozzz/PeerTube
21 lines
680 B
TypeScript
21 lines
680 B
TypeScript
import { isActorFollowActivityValid } from './actor'
|
|
import { isBaseActivityValid } from './misc'
|
|
import { isDislikeActivityValid, isLikeActivityValid } from './rate'
|
|
import { isAnnounceActivityValid } from './announce'
|
|
import { isCacheFileCreateActivityValid } from './cache-file'
|
|
|
|
function isUndoActivityValid (activity: any) {
|
|
return isBaseActivityValid(activity, 'Undo') &&
|
|
(
|
|
isActorFollowActivityValid(activity.object) ||
|
|
isLikeActivityValid(activity.object) ||
|
|
isDislikeActivityValid(activity.object) ||
|
|
isAnnounceActivityValid(activity.object) ||
|
|
isCacheFileCreateActivityValid(activity.object)
|
|
)
|
|
}
|
|
|
|
export {
|
|
isUndoActivityValid
|
|
}
|