aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos/ownership.ts
diff options
context:
space:
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 }