Fix player play exception on chromium
[oweals/peertube.git] / server / lib / activitypub / share.ts
index fb01368ec8c2351c1aced31632d08b556ff58b3a..294a6838d3ec699eb07f68a36b98789146c24009 100644 (file)
@@ -1,10 +1,13 @@
 import { Transaction } from 'sequelize'
+import { VideoPrivacy } from '../../../shared/models/videos'
 import { getServerActor } from '../../helpers'
 import { VideoModel } from '../../models/video/video'
 import { VideoShareModel } from '../../models/video/video-share'
 import { sendVideoAnnounceToFollowers } from './send'
 
 async function shareVideoByServerAndChannel (video: VideoModel, t: Transaction) {
+  if (video.privacy === VideoPrivacy.PRIVATE) return undefined
+
   const serverActor = await getServerActor()
 
   const serverShare = VideoShareModel.create({