diff options
Diffstat (limited to 'server/lib/activitypub/share.ts')
-rw-r--r-- | server/lib/activitypub/share.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/server/lib/activitypub/share.ts b/server/lib/activitypub/share.ts index fdca9bed7..e847c4b7d 100644 --- a/server/lib/activitypub/share.ts +++ b/server/lib/activitypub/share.ts | |||
@@ -1,5 +1,4 @@ | |||
1 | import { Transaction } from 'sequelize' | 1 | import { Transaction } from 'sequelize' |
2 | import { VideoPrivacy } from '../../../shared/models/videos' | ||
3 | import { getServerActor } from '../../helpers/utils' | 2 | import { getServerActor } from '../../helpers/utils' |
4 | import { VideoShareModel } from '../../models/video/video-share' | 3 | import { VideoShareModel } from '../../models/video/video-share' |
5 | import { sendUndoAnnounce, sendVideoAnnounce } from './send' | 4 | import { sendUndoAnnounce, sendVideoAnnounce } from './send' |
@@ -10,10 +9,10 @@ import { getOrCreateActorAndServerAndModel } from './actor' | |||
10 | import { logger } from '../../helpers/logger' | 9 | import { logger } from '../../helpers/logger' |
11 | import { CRAWL_REQUEST_CONCURRENCY } from '../../initializers/constants' | 10 | import { CRAWL_REQUEST_CONCURRENCY } from '../../initializers/constants' |
12 | import { checkUrlsSameHost, getAPId } from '../../helpers/activitypub' | 11 | import { checkUrlsSameHost, getAPId } from '../../helpers/activitypub' |
13 | import { MChannelActor, MChannelActorLight, MVideo, MVideoAccountLight, MVideoId } from '../../typings/models/video' | 12 | import { MChannelActorLight, MVideo, MVideoAccountLight, MVideoId } from '../../typings/models/video' |
14 | 13 | ||
15 | async function shareVideoByServerAndChannel (video: MVideoAccountLight, t: Transaction) { | 14 | async function shareVideoByServerAndChannel (video: MVideoAccountLight, t: Transaction) { |
16 | if (video.privacy === VideoPrivacy.PRIVATE) return undefined | 15 | if (!video.hasPrivacyForFederation()) return undefined |
17 | 16 | ||
18 | return Promise.all([ | 17 | return Promise.all([ |
19 | shareByServer(video, t), | 18 | shareByServer(video, t), |