2017-12-14 11:38:41 -05:00
|
|
|
import { isActorFollowActivityValid } from './actor'
|
2017-11-20 03:43:39 -05:00
|
|
|
import { isBaseActivityValid } from './misc'
|
2017-11-23 08:19:55 -05:00
|
|
|
import { isDislikeActivityValid, isLikeActivityValid } from './rate'
|
2017-11-20 03:43:39 -05:00
|
|
|
|
2017-11-23 08:19:55 -05:00
|
|
|
function isUndoActivityValid (activity: any) {
|
2017-11-20 03:43:39 -05:00
|
|
|
return isBaseActivityValid(activity, 'Undo') &&
|
|
|
|
(
|
2017-12-14 11:38:41 -05:00
|
|
|
isActorFollowActivityValid(activity.object) ||
|
2017-11-23 08:19:55 -05:00
|
|
|
isLikeActivityValid(activity.object) ||
|
|
|
|
isDislikeActivityValid(activity.object)
|
2017-11-20 03:43:39 -05:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
export {
|
2017-11-23 08:19:55 -05:00
|
|
|
isUndoActivityValid
|
2017-11-20 03:43:39 -05:00
|
|
|
}
|