Fix federation when updating a video
authorChocobozzz <me@florianbigard.com>
Fri, 10 Jan 2020 09:10:48 +0000 (10:10 +0100)
committerChocobozzz <me@florianbigard.com>
Fri, 10 Jan 2020 09:30:36 +0000 (10:30 +0100)
server/models/video/video.ts

index ac8c81ddf27024f23e9d467d7515aff7ce1e3a31..243871028a4a9526adc692befbbcb281d9cd0b0e 100644 (file)
@@ -1802,7 +1802,9 @@ export class VideoModel extends Model<VideoModel> {
   }
 
   private static isPrivacyForFederation (privacy: VideoPrivacy) {
-    return privacy === VideoPrivacy.PUBLIC || privacy === VideoPrivacy.UNLISTED
+    const castedPrivacy = parseInt(privacy + '', 10)
+
+    return castedPrivacy === VideoPrivacy.PUBLIC || castedPrivacy === VideoPrivacy.UNLISTED
   }
 
   static getCategoryLabel (id: number) {