aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos/ownership.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/controllers/api/videos/ownership.ts
parent91fa7960f42cff3481465bece3389007fbc278d3 (diff)
downloadPeerTube-22a73cb879a5cc775d4bec3d72fa9c9cf52e5175.tar.gz
PeerTube-22a73cb879a5cc775d4bec3d72fa9c9cf52e5175.tar.zst
PeerTube-22a73cb879a5cc775d4bec3d72fa9c9cf52e5175.zip
Add internal privacy mode
Diffstat (limited to 'server/controllers/api/videos/ownership.ts')
-rw-r--r--server/controllers/api/videos/ownership.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/api/videos/ownership.ts b/server/controllers/api/videos/ownership.ts
index abb34082e..41d7cdc43 100644
--- a/server/controllers/api/videos/ownership.ts
+++ b/server/controllers/api/videos/ownership.ts
@@ -12,7 +12,7 @@ import {
12 videosTerminateChangeOwnershipValidator 12 videosTerminateChangeOwnershipValidator
13} from '../../../middlewares' 13} from '../../../middlewares'
14import { VideoChangeOwnershipModel } from '../../../models/video/video-change-ownership' 14import { VideoChangeOwnershipModel } from '../../../models/video/video-change-ownership'
15import { VideoChangeOwnershipStatus, VideoPrivacy, VideoState } from '../../../../shared/models/videos' 15import { VideoChangeOwnershipStatus, VideoState } from '../../../../shared/models/videos'
16import { VideoChannelModel } from '../../../models/video/video-channel' 16import { VideoChannelModel } from '../../../models/video/video-channel'
17import { getFormattedObjects } from '../../../helpers/utils' 17import { getFormattedObjects } from '../../../helpers/utils'
18import { changeVideoChannelShare } from '../../../lib/activitypub' 18import { changeVideoChannelShare } from '../../../lib/activitypub'
@@ -111,7 +111,7 @@ async function acceptOwnership (req: express.Request, res: express.Response) {
111 const targetVideoUpdated = await targetVideo.save({ transaction: t }) as MVideoFullLight 111 const targetVideoUpdated = await targetVideo.save({ transaction: t }) as MVideoFullLight
112 targetVideoUpdated.VideoChannel = channel 112 targetVideoUpdated.VideoChannel = channel
113 113
114 if (targetVideoUpdated.privacy !== VideoPrivacy.PRIVATE && targetVideoUpdated.state === VideoState.PUBLISHED) { 114 if (targetVideoUpdated.hasPrivacyForFederation() && targetVideoUpdated.state === VideoState.PUBLISHED) {
115 await changeVideoChannelShare(targetVideoUpdated, oldVideoChannel, t) 115 await changeVideoChannelShare(targetVideoUpdated, oldVideoChannel, t)
116 await sendUpdateVideo(targetVideoUpdated, t, oldVideoChannel.Account.Actor) 116 await sendUpdateVideo(targetVideoUpdated, t, oldVideoChannel.Account.Actor)
117 } 117 }