-import { getVideoAnnounceActivityPubUrl } from './url'
-import { VideoChannelModel } from '../../models/video/video-channel'
-import * as Bluebird from 'bluebird'
-import { doRequest } from '../../helpers/requests'
-import { getOrCreateActorAndServerAndModel } from './actor'
-import { logger } from '../../helpers/logger'
-import { CRAWL_REQUEST_CONCURRENCY } from '../../initializers'
-import { checkUrlsSameHost, getAPUrl } from '../../helpers/activitypub'
-
-async function shareVideoByServerAndChannel (video: VideoModel, t: Transaction) {
- if (video.privacy === VideoPrivacy.PRIVATE) return undefined
+import { checkUrlsSameHost, getLocalVideoAnnounceActivityPubUrl } from './url'
+
+const lTags = loggerTagsFactory('share')
+
+async function shareVideoByServerAndChannel (video: MVideoAccountLight, t: Transaction) {
+ if (!video.hasPrivacyForFederation()) return undefined