diff options
author | Chocobozzz <me@florianbigard.com> | 2019-12-12 15:47:47 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-12-12 16:51:59 +0100 |
commit | 22a73cb879a5cc775d4bec3d72fa9c9cf52e5175 (patch) | |
tree | 4c8d2d4f6fce8a520420ec83722fefc6d57b7a83 /server/controllers/api/videos/ownership.ts | |
parent | 91fa7960f42cff3481465bece3389007fbc278d3 (diff) | |
download | PeerTube-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.ts | 4 |
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' |
14 | import { VideoChangeOwnershipModel } from '../../../models/video/video-change-ownership' | 14 | import { VideoChangeOwnershipModel } from '../../../models/video/video-change-ownership' |
15 | import { VideoChangeOwnershipStatus, VideoPrivacy, VideoState } from '../../../../shared/models/videos' | 15 | import { VideoChangeOwnershipStatus, VideoState } from '../../../../shared/models/videos' |
16 | import { VideoChannelModel } from '../../../models/video/video-channel' | 16 | import { VideoChannelModel } from '../../../models/video/video-channel' |
17 | import { getFormattedObjects } from '../../../helpers/utils' | 17 | import { getFormattedObjects } from '../../../helpers/utils' |
18 | import { changeVideoChannelShare } from '../../../lib/activitypub' | 18 | import { 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 | } |