aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers')
-rw-r--r--server/controllers/feeds.ts15
1 files changed, 6 insertions, 9 deletions
diff --git a/server/controllers/feeds.ts b/server/controllers/feeds.ts
index 5c95069fc..2182b42f5 100644
--- a/server/controllers/feeds.ts
+++ b/server/controllers/feeds.ts
@@ -12,7 +12,7 @@ import {
12 videoCommentsFeedsValidator, 12 videoCommentsFeedsValidator,
13 videoFeedsValidator, 13 videoFeedsValidator,
14 videosSortValidator, 14 videosSortValidator,
15 videoSubscriptonFeedsValidator 15 videoSubscriptionFeedsValidator
16} from '../middlewares' 16} from '../middlewares'
17import { cacheRoute } from '../middlewares/cache' 17import { cacheRoute } from '../middlewares/cache'
18import { VideoModel } from '../models/video/video' 18import { VideoModel } from '../models/video/video'
@@ -60,7 +60,7 @@ feedsRouter.get('/feeds/subscriptions.:format',
60 ] 60 ]
61 })(ROUTE_CACHE_LIFETIME.FEEDS)), 61 })(ROUTE_CACHE_LIFETIME.FEEDS)),
62 commonVideosFiltersValidator, 62 commonVideosFiltersValidator,
63 asyncMiddleware(videoSubscriptonFeedsValidator), 63 asyncMiddleware(videoSubscriptionFeedsValidator),
64 asyncMiddleware(generateVideoFeedForSubscriptions) 64 asyncMiddleware(generateVideoFeedForSubscriptions)
65) 65)
66 66
@@ -198,20 +198,17 @@ async function generateVideoFeedForSubscriptions (req: express.Request, res: exp
198 queryString: new URL(WEBSERVER.URL + req.url).search 198 queryString: new URL(WEBSERVER.URL + req.url).search
199 }) 199 })
200 200
201 const options = {
202 followerActorId: res.locals.user.Account.Actor.id,
203 user: res.locals.user
204 }
205
206 const resultList = await VideoModel.listForApi({ 201 const resultList = await VideoModel.listForApi({
207 start, 202 start,
208 count: FEEDS.COUNT, 203 count: FEEDS.COUNT,
209 sort: req.query.sort, 204 sort: req.query.sort,
210 includeLocalVideos: true, 205 includeLocalVideos: false,
211 nsfw, 206 nsfw,
212 filter: req.query.filter as VideoFilter, 207 filter: req.query.filter as VideoFilter,
213 withFiles: true, 208 withFiles: true,
214 ...options 209
210 followerActorId: res.locals.user.Account.Actor.id,
211 user: res.locals.user
215 }) 212 })
216 213
217 addVideosToFeed(feed, resultList.data) 214 addVideosToFeed(feed, resultList.data)