mirror of https://github.com/Chocobozzz/PeerTube
14 lines
343 B
TypeScript
14 lines
343 B
TypeScript
import { isActivityPubUrlValid, isBaseActivityValid } from './misc'
|
|
|
|
function isAnnounceActivityValid (activity: any) {
|
|
return isBaseActivityValid(activity, 'Announce') &&
|
|
(
|
|
isActivityPubUrlValid(activity.object) ||
|
|
(activity.object && isActivityPubUrlValid(activity.object.id))
|
|
)
|
|
}
|
|
|
|
export {
|
|
isAnnounceActivityValid
|
|
}
|