From 22a73cb879a5cc775d4bec3d72fa9c9cf52e5175 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 12 Dec 2019 15:47:47 +0100 Subject: Add internal privacy mode --- server/lib/activitypub/share.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'server/lib/activitypub/share.ts') diff --git a/server/lib/activitypub/share.ts b/server/lib/activitypub/share.ts index fdca9bed7..e847c4b7d 100644 --- a/server/lib/activitypub/share.ts +++ b/server/lib/activitypub/share.ts @@ -1,5 +1,4 @@ import { Transaction } from 'sequelize' -import { VideoPrivacy } from '../../../shared/models/videos' import { getServerActor } from '../../helpers/utils' import { VideoShareModel } from '../../models/video/video-share' import { sendUndoAnnounce, sendVideoAnnounce } from './send' @@ -10,10 +9,10 @@ import { getOrCreateActorAndServerAndModel } from './actor' import { logger } from '../../helpers/logger' import { CRAWL_REQUEST_CONCURRENCY } from '../../initializers/constants' import { checkUrlsSameHost, getAPId } from '../../helpers/activitypub' -import { MChannelActor, MChannelActorLight, MVideo, MVideoAccountLight, MVideoId } from '../../typings/models/video' +import { MChannelActorLight, MVideo, MVideoAccountLight, MVideoId } from '../../typings/models/video' async function shareVideoByServerAndChannel (video: MVideoAccountLight, t: Transaction) { - if (video.privacy === VideoPrivacy.PRIVATE) return undefined + if (!video.hasPrivacyForFederation()) return undefined return Promise.all([ shareByServer(video, t), -- cgit v1.2.3