diff options
author | Chocobozzz <me@florianbigard.com> | 2020-11-06 10:57:40 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-11-09 15:33:04 +0100 |
commit | 053aed43fb255b4ae4324a845534f2f562c3b6cc (patch) | |
tree | 04cae6af371a1ee869051c67be28acea5581d16d /server/controllers/activitypub | |
parent | 3bc68dfd6183078fb56b53e24e74f889c85c4ae0 (diff) | |
download | PeerTube-053aed43fb255b4ae4324a845534f2f562c3b6cc.tar.gz PeerTube-053aed43fb255b4ae4324a845534f2f562c3b6cc.tar.zst PeerTube-053aed43fb255b4ae4324a845534f2f562c3b6cc.zip |
Regenerate miniature on live save
Diffstat (limited to 'server/controllers/activitypub')
-rw-r--r-- | server/controllers/activitypub/client.ts | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/server/controllers/activitypub/client.ts b/server/controllers/activitypub/client.ts index df2a01d2c..d85d0aa5f 100644 --- a/server/controllers/activitypub/client.ts +++ b/server/controllers/activitypub/client.ts | |||
@@ -1,11 +1,22 @@ | |||
1 | import * as express from 'express' | ||
2 | import * as cors from 'cors' | 1 | import * as cors from 'cors' |
2 | import * as express from 'express' | ||
3 | import { getRateUrl } from '@server/lib/activitypub/video-rates' | ||
4 | import { getServerActor } from '@server/models/application/application' | ||
5 | import { MAccountId, MActorId, MChannelId, MVideoId } from '@server/types/models' | ||
3 | import { VideoPrivacy, VideoRateType } from '../../../shared/models/videos' | 6 | import { VideoPrivacy, VideoRateType } from '../../../shared/models/videos' |
7 | import { VideoPlaylistPrivacy } from '../../../shared/models/videos/playlist/video-playlist-privacy.model' | ||
4 | import { activityPubCollectionPagination, activityPubContextify } from '../../helpers/activitypub' | 8 | import { activityPubCollectionPagination, activityPubContextify } from '../../helpers/activitypub' |
5 | import { ROUTE_CACHE_LIFETIME, WEBSERVER } from '../../initializers/constants' | 9 | import { ROUTE_CACHE_LIFETIME, WEBSERVER } from '../../initializers/constants' |
6 | import { buildAnnounceWithVideoAudience, buildLikeActivity } from '../../lib/activitypub/send' | ||
7 | import { audiencify, getAudience } from '../../lib/activitypub/audience' | 10 | import { audiencify, getAudience } from '../../lib/activitypub/audience' |
11 | import { buildAnnounceWithVideoAudience, buildLikeActivity } from '../../lib/activitypub/send' | ||
8 | import { buildCreateActivity } from '../../lib/activitypub/send/send-create' | 12 | import { buildCreateActivity } from '../../lib/activitypub/send/send-create' |
13 | import { buildDislikeActivity } from '../../lib/activitypub/send/send-dislike' | ||
14 | import { | ||
15 | getVideoCommentsActivityPubUrl, | ||
16 | getVideoDislikesActivityPubUrl, | ||
17 | getVideoLikesActivityPubUrl, | ||
18 | getVideoSharesActivityPubUrl | ||
19 | } from '../../lib/activitypub/url' | ||
9 | import { | 20 | import { |
10 | asyncMiddleware, | 21 | asyncMiddleware, |
11 | executeIfActivityPub, | 22 | executeIfActivityPub, |
@@ -14,30 +25,19 @@ import { | |||
14 | videosCustomGetValidator, | 25 | videosCustomGetValidator, |
15 | videosShareValidator | 26 | videosShareValidator |
16 | } from '../../middlewares' | 27 | } from '../../middlewares' |
28 | import { cacheRoute } from '../../middlewares/cache' | ||
17 | import { getAccountVideoRateValidatorFactory, videoCommentGetValidator } from '../../middlewares/validators' | 29 | import { getAccountVideoRateValidatorFactory, videoCommentGetValidator } from '../../middlewares/validators' |
30 | import { videoFileRedundancyGetValidator, videoPlaylistRedundancyGetValidator } from '../../middlewares/validators/redundancy' | ||
31 | import { videoPlaylistElementAPGetValidator, videoPlaylistsGetValidator } from '../../middlewares/validators/videos/video-playlists' | ||
18 | import { AccountModel } from '../../models/account/account' | 32 | import { AccountModel } from '../../models/account/account' |
33 | import { AccountVideoRateModel } from '../../models/account/account-video-rate' | ||
19 | import { ActorFollowModel } from '../../models/activitypub/actor-follow' | 34 | import { ActorFollowModel } from '../../models/activitypub/actor-follow' |
20 | import { VideoModel } from '../../models/video/video' | 35 | import { VideoModel } from '../../models/video/video' |
36 | import { VideoCaptionModel } from '../../models/video/video-caption' | ||
21 | import { VideoCommentModel } from '../../models/video/video-comment' | 37 | import { VideoCommentModel } from '../../models/video/video-comment' |
38 | import { VideoPlaylistModel } from '../../models/video/video-playlist' | ||
22 | import { VideoShareModel } from '../../models/video/video-share' | 39 | import { VideoShareModel } from '../../models/video/video-share' |
23 | import { cacheRoute } from '../../middlewares/cache' | ||
24 | import { activityPubResponse } from './utils' | 40 | import { activityPubResponse } from './utils' |
25 | import { AccountVideoRateModel } from '../../models/account/account-video-rate' | ||
26 | import { | ||
27 | getVideoCommentsActivityPubUrl, | ||
28 | getVideoDislikesActivityPubUrl, | ||
29 | getVideoLikesActivityPubUrl, | ||
30 | getVideoSharesActivityPubUrl | ||
31 | } from '../../lib/activitypub/url' | ||
32 | import { VideoCaptionModel } from '../../models/video/video-caption' | ||
33 | import { videoFileRedundancyGetValidator, videoPlaylistRedundancyGetValidator } from '../../middlewares/validators/redundancy' | ||
34 | import { buildDislikeActivity } from '../../lib/activitypub/send/send-dislike' | ||
35 | import { videoPlaylistElementAPGetValidator, videoPlaylistsGetValidator } from '../../middlewares/validators/videos/video-playlists' | ||
36 | import { VideoPlaylistModel } from '../../models/video/video-playlist' | ||
37 | import { VideoPlaylistPrivacy } from '../../../shared/models/videos/playlist/video-playlist-privacy.model' | ||
38 | import { MAccountId, MActorId, MVideoAPWithoutCaption, MVideoId, MChannelId } from '@server/types/models' | ||
39 | import { getServerActor } from '@server/models/application/application' | ||
40 | import { getRateUrl } from '@server/lib/activitypub/video-rates' | ||
41 | 41 | ||
42 | const activityPubClientRouter = express.Router() | 42 | const activityPubClientRouter = express.Router() |
43 | activityPubClientRouter.use(cors()) | 43 | activityPubClientRouter.use(cors()) |