aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/users/my-subscriptions.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/users/my-subscriptions.ts')
-rw-r--r--server/controllers/api/users/my-subscriptions.ts9
1 files changed, 6 insertions, 3 deletions
diff --git a/server/controllers/api/users/my-subscriptions.ts b/server/controllers/api/users/my-subscriptions.ts
index b2b441673..d96378180 100644
--- a/server/controllers/api/users/my-subscriptions.ts
+++ b/server/controllers/api/users/my-subscriptions.ts
@@ -2,6 +2,7 @@ import 'multer'
2import express from 'express' 2import express from 'express'
3import { pickCommonVideoQuery } from '@server/helpers/query' 3import { pickCommonVideoQuery } from '@server/helpers/query'
4import { sendUndoFollow } from '@server/lib/activitypub/send' 4import { sendUndoFollow } from '@server/lib/activitypub/send'
5import { guessAdditionalAttributesFromQuery } from '@server/models/video/formatter/video-format-utils'
5import { VideoChannelModel } from '@server/models/video/video-channel' 6import { VideoChannelModel } from '@server/models/video/video-channel'
6import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' 7import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes'
7import { buildNSFWFilter, getCountVideos } from '../../../helpers/express-utils' 8import { buildNSFWFilter, getCountVideos } from '../../../helpers/express-utils'
@@ -175,13 +176,15 @@ async function getUserSubscriptionVideos (req: express.Request, res: express.Res
175 const resultList = await VideoModel.listForApi({ 176 const resultList = await VideoModel.listForApi({
176 ...query, 177 ...query,
177 178
178 includeLocalVideos: false, 179 displayOnlyForFollower: {
180 actorId: user.Account.Actor.id,
181 orLocalVideos: false
182 },
179 nsfw: buildNSFWFilter(res, query.nsfw), 183 nsfw: buildNSFWFilter(res, query.nsfw),
180 withFiles: false, 184 withFiles: false,
181 followerActorId: user.Account.Actor.id,
182 user, 185 user,
183 countVideos 186 countVideos
184 }) 187 })
185 188
186 return res.json(getFormattedObjects(resultList.data, resultList.total)) 189 return res.json(getFormattedObjects(resultList.data, resultList.total, guessAdditionalAttributesFromQuery(query)))
187} 190}