From: Chocobozzz Date: Fri, 10 Jan 2020 09:10:48 +0000 (+0100) Subject: Fix federation when updating a video X-Git-Tag: v2.1.0-rc.1~46 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=dce659fa7cb2b0f814e454a7a5c6860f9c37b39e;p=oweals%2Fpeertube.git Fix federation when updating a video --- diff --git a/server/models/video/video.ts b/server/models/video/video.ts index ac8c81ddf..243871028 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts @@ -1802,7 +1802,9 @@ export class VideoModel extends Model { } 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) {