aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub/share.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-12-12 15:47:47 +0100
committerChocobozzz <me@florianbigard.com>2019-12-12 16:51:59 +0100
commit22a73cb879a5cc775d4bec3d72fa9c9cf52e5175 (patch)
tree4c8d2d4f6fce8a520420ec83722fefc6d57b7a83 /server/lib/activitypub/share.ts
parent91fa7960f42cff3481465bece3389007fbc278d3 (diff)
downloadPeerTube-22a73cb879a5cc775d4bec3d72fa9c9cf52e5175.tar.gz
PeerTube-22a73cb879a5cc775d4bec3d72fa9c9cf52e5175.tar.zst
PeerTube-22a73cb879a5cc775d4bec3d72fa9c9cf52e5175.zip
Add internal privacy mode
Diffstat (limited to 'server/lib/activitypub/share.ts')
-rw-r--r--server/lib/activitypub/share.ts5
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 @@
1import { Transaction } from 'sequelize' 1import { Transaction } from 'sequelize'
2import { VideoPrivacy } from '../../../shared/models/videos'
3import { getServerActor } from '../../helpers/utils' 2import { getServerActor } from '../../helpers/utils'
4import { VideoShareModel } from '../../models/video/video-share' 3import { VideoShareModel } from '../../models/video/video-share'
5import { sendUndoAnnounce, sendVideoAnnounce } from './send' 4import { sendUndoAnnounce, sendVideoAnnounce } from './send'
@@ -10,10 +9,10 @@ import { getOrCreateActorAndServerAndModel } from './actor'
10import { logger } from '../../helpers/logger' 9import { logger } from '../../helpers/logger'
11import { CRAWL_REQUEST_CONCURRENCY } from '../../initializers/constants' 10import { CRAWL_REQUEST_CONCURRENCY } from '../../initializers/constants'
12import { checkUrlsSameHost, getAPId } from '../../helpers/activitypub' 11import { checkUrlsSameHost, getAPId } from '../../helpers/activitypub'
13import { MChannelActor, MChannelActorLight, MVideo, MVideoAccountLight, MVideoId } from '../../typings/models/video' 12import { MChannelActorLight, MVideo, MVideoAccountLight, MVideoId } from '../../typings/models/video'
14 13
15async function shareVideoByServerAndChannel (video: MVideoAccountLight, t: Transaction) { 14async 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),