2017-12-19 11:07:58 -05:00
|
|
|
import { isActivityPubUrlValid, isBaseActivityValid } from './misc'
|
2017-11-20 03:43:39 -05:00
|
|
|
|
2017-11-23 08:19:55 -05:00
|
|
|
function isAnnounceActivityValid (activity: any) {
|
2017-11-20 03:43:39 -05:00
|
|
|
return isBaseActivityValid(activity, 'Announce') &&
|
|
|
|
(
|
2018-01-26 06:02:18 -05:00
|
|
|
isActivityPubUrlValid(activity.object) ||
|
|
|
|
(activity.object && isActivityPubUrlValid(activity.object.id))
|
2017-11-20 03:43:39 -05:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
export {
|
2017-11-23 08:19:55 -05:00
|
|
|
isAnnounceActivityValid
|
2017-11-20 03:43:39 -05:00
|
|
|
}
|