aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/activitypub
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-11-06 10:57:40 +0100
committerChocobozzz <chocobozzz@cpy.re>2020-11-09 15:33:04 +0100
commit053aed43fb255b4ae4324a845534f2f562c3b6cc (patch)
tree04cae6af371a1ee869051c67be28acea5581d16d /server/controllers/activitypub
parent3bc68dfd6183078fb56b53e24e74f889c85c4ae0 (diff)
downloadPeerTube-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.ts38
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 @@
1import * as express from 'express'
2import * as cors from 'cors' 1import * as cors from 'cors'
2import * as express from 'express'
3import { getRateUrl } from '@server/lib/activitypub/video-rates'
4import { getServerActor } from '@server/models/application/application'
5import { MAccountId, MActorId, MChannelId, MVideoId } from '@server/types/models'
3import { VideoPrivacy, VideoRateType } from '../../../shared/models/videos' 6import { VideoPrivacy, VideoRateType } from '../../../shared/models/videos'
7import { VideoPlaylistPrivacy } from '../../../shared/models/videos/playlist/video-playlist-privacy.model'
4import { activityPubCollectionPagination, activityPubContextify } from '../../helpers/activitypub' 8import { activityPubCollectionPagination, activityPubContextify } from '../../helpers/activitypub'
5import { ROUTE_CACHE_LIFETIME, WEBSERVER } from '../../initializers/constants' 9import { ROUTE_CACHE_LIFETIME, WEBSERVER } from '../../initializers/constants'
6import { buildAnnounceWithVideoAudience, buildLikeActivity } from '../../lib/activitypub/send'
7import { audiencify, getAudience } from '../../lib/activitypub/audience' 10import { audiencify, getAudience } from '../../lib/activitypub/audience'
11import { buildAnnounceWithVideoAudience, buildLikeActivity } from '../../lib/activitypub/send'
8import { buildCreateActivity } from '../../lib/activitypub/send/send-create' 12import { buildCreateActivity } from '../../lib/activitypub/send/send-create'
13import { buildDislikeActivity } from '../../lib/activitypub/send/send-dislike'
14import {
15 getVideoCommentsActivityPubUrl,
16 getVideoDislikesActivityPubUrl,
17 getVideoLikesActivityPubUrl,
18 getVideoSharesActivityPubUrl
19} from '../../lib/activitypub/url'
9import { 20import {
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'
28import { cacheRoute } from '../../middlewares/cache'
17import { getAccountVideoRateValidatorFactory, videoCommentGetValidator } from '../../middlewares/validators' 29import { getAccountVideoRateValidatorFactory, videoCommentGetValidator } from '../../middlewares/validators'
30import { videoFileRedundancyGetValidator, videoPlaylistRedundancyGetValidator } from '../../middlewares/validators/redundancy'
31import { videoPlaylistElementAPGetValidator, videoPlaylistsGetValidator } from '../../middlewares/validators/videos/video-playlists'
18import { AccountModel } from '../../models/account/account' 32import { AccountModel } from '../../models/account/account'
33import { AccountVideoRateModel } from '../../models/account/account-video-rate'
19import { ActorFollowModel } from '../../models/activitypub/actor-follow' 34import { ActorFollowModel } from '../../models/activitypub/actor-follow'
20import { VideoModel } from '../../models/video/video' 35import { VideoModel } from '../../models/video/video'
36import { VideoCaptionModel } from '../../models/video/video-caption'
21import { VideoCommentModel } from '../../models/video/video-comment' 37import { VideoCommentModel } from '../../models/video/video-comment'
38import { VideoPlaylistModel } from '../../models/video/video-playlist'
22import { VideoShareModel } from '../../models/video/video-share' 39import { VideoShareModel } from '../../models/video/video-share'
23import { cacheRoute } from '../../middlewares/cache'
24import { activityPubResponse } from './utils' 40import { activityPubResponse } from './utils'
25import { AccountVideoRateModel } from '../../models/account/account-video-rate'
26import {
27 getVideoCommentsActivityPubUrl,
28 getVideoDislikesActivityPubUrl,
29 getVideoLikesActivityPubUrl,
30 getVideoSharesActivityPubUrl
31} from '../../lib/activitypub/url'
32import { VideoCaptionModel } from '../../models/video/video-caption'
33import { videoFileRedundancyGetValidator, videoPlaylistRedundancyGetValidator } from '../../middlewares/validators/redundancy'
34import { buildDislikeActivity } from '../../lib/activitypub/send/send-dislike'
35import { videoPlaylistElementAPGetValidator, videoPlaylistsGetValidator } from '../../middlewares/validators/videos/video-playlists'
36import { VideoPlaylistModel } from '../../models/video/video-playlist'
37import { VideoPlaylistPrivacy } from '../../../shared/models/videos/playlist/video-playlist-privacy.model'
38import { MAccountId, MActorId, MVideoAPWithoutCaption, MVideoId, MChannelId } from '@server/types/models'
39import { getServerActor } from '@server/models/application/application'
40import { getRateUrl } from '@server/lib/activitypub/video-rates'
41 41
42const activityPubClientRouter = express.Router() 42const activityPubClientRouter = express.Router()
43activityPubClientRouter.use(cors()) 43activityPubClientRouter.use(cors())