From 57e4e1c1a95c3a81a967f54ecc2a510d8b0e129c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 18 Mar 2022 11:17:35 +0100 Subject: Don't store remote rates of remote videos In the future we'll stop to expose all available rates to improve users privacy --- server/controllers/activitypub/client.ts | 2 ++ server/controllers/api/search/search-videos.ts | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'server/controllers') diff --git a/server/controllers/activitypub/client.ts b/server/controllers/activitypub/client.ts index c4d1be121..fc27ebbe8 100644 --- a/server/controllers/activitypub/client.ts +++ b/server/controllers/activitypub/client.ts @@ -66,11 +66,13 @@ activityPubClientRouter.get('/accounts?/:name/playlists', ) activityPubClientRouter.get('/accounts?/:name/likes/:videoId', executeIfActivityPub, + cacheRoute(ROUTE_CACHE_LIFETIME.ACTIVITY_PUB.VIDEOS), asyncMiddleware(getAccountVideoRateValidatorFactory('like')), getAccountVideoRateFactory('like') ) activityPubClientRouter.get('/accounts?/:name/dislikes/:videoId', executeIfActivityPub, + cacheRoute(ROUTE_CACHE_LIFETIME.ACTIVITY_PUB.VIDEOS), asyncMiddleware(getAccountVideoRateValidatorFactory('dislike')), getAccountVideoRateFactory('dislike') ) diff --git a/server/controllers/api/search/search-videos.ts b/server/controllers/api/search/search-videos.ts index 68428d766..1d7a7b7bc 100644 --- a/server/controllers/api/search/search-videos.ts +++ b/server/controllers/api/search/search-videos.ts @@ -134,8 +134,7 @@ async function searchVideoURI (url: string, res: express.Response) { if (isUserAbleToSearchRemoteURI(res)) { try { const syncParam = { - likes: false, - dislikes: false, + rates: false, shares: false, comments: false, thumbnail: true, -- cgit v1.2.3