diff options
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 | } |