diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/lib/activitypub/send/send-create.ts | 2 | ||||
-rw-r--r-- | server/lib/activitypub/share.ts | 2 | ||||
-rw-r--r-- | server/middlewares/servers.ts | 4 |
3 files changed, 3 insertions, 5 deletions
diff --git a/server/lib/activitypub/send/send-create.ts b/server/lib/activitypub/send/send-create.ts index 249dd91dc..27b03c45f 100644 --- a/server/lib/activitypub/send/send-create.ts +++ b/server/lib/activitypub/send/send-create.ts | |||
@@ -17,7 +17,7 @@ import { | |||
17 | } from './misc' | 17 | } from './misc' |
18 | 18 | ||
19 | async function sendCreateVideo (video: VideoModel, t: Transaction) { | 19 | async function sendCreateVideo (video: VideoModel, t: Transaction) { |
20 | if (video.privacy === VideoPrivacy.PRIVATE) return | 20 | if (video.privacy === VideoPrivacy.PRIVATE) return undefined |
21 | 21 | ||
22 | const byActor = video.VideoChannel.Account.Actor | 22 | const byActor = video.VideoChannel.Account.Actor |
23 | const videoObject = video.toActivityPubObject() | 23 | const videoObject = video.toActivityPubObject() |
diff --git a/server/lib/activitypub/share.ts b/server/lib/activitypub/share.ts index 386ae362a..294a6838d 100644 --- a/server/lib/activitypub/share.ts +++ b/server/lib/activitypub/share.ts | |||
@@ -6,7 +6,7 @@ import { VideoShareModel } from '../../models/video/video-share' | |||
6 | import { sendVideoAnnounceToFollowers } from './send' | 6 | import { sendVideoAnnounceToFollowers } from './send' |
7 | 7 | ||
8 | async function shareVideoByServerAndChannel (video: VideoModel, t: Transaction) { | 8 | async function shareVideoByServerAndChannel (video: VideoModel, t: Transaction) { |
9 | if (video.privacy === VideoPrivacy.PRIVATE) return | 9 | if (video.privacy === VideoPrivacy.PRIVATE) return undefined |
10 | 10 | ||
11 | const serverActor = await getServerActor() | 11 | const serverActor = await getServerActor() |
12 | 12 | ||
diff --git a/server/middlewares/servers.ts b/server/middlewares/servers.ts index 87bbe9fd7..e16bc4a86 100644 --- a/server/middlewares/servers.ts +++ b/server/middlewares/servers.ts | |||
@@ -1,9 +1,7 @@ | |||
1 | import 'express-validator' | ||
2 | import * as express from 'express' | 1 | import * as express from 'express' |
2 | import 'express-validator' | ||
3 | import { getHostWithPort } from '../helpers' | 3 | import { getHostWithPort } from '../helpers' |
4 | 4 | ||
5 | import { REMOTE_SCHEME } from '../initializers' | ||
6 | |||
7 | function setBodyHostsPort (req: express.Request, res: express.Response, next: express.NextFunction) { | 5 | function setBodyHostsPort (req: express.Request, res: express.Response, next: express.NextFunction) { |
8 | if (!req.body.hosts) return next() | 6 | if (!req.body.hosts) return next() |
9 | 7 | ||