Переглянути джерело

Merge pull request #1703 from pixelfed/staging

Update DiscoverController, limit Loops to local only posts
daniel 5 роки тому
батько
коміт
66d4b9a0bf
2 змінених файлів з 3 додано та 1 видалено
  1. 1 0
      CHANGELOG.md
  2. 2 1
      app/Http/Controllers/DiscoverController.php

+ 1 - 0
CHANGELOG.md

@@ -13,6 +13,7 @@
 - Updated quill.js to v1.3.7 [#1692](https://github.com/pixelfed/pixelfed/pull/1690)
 - Cache ProfileController [#1700](https://github.com/pixelfed/pixelfed/pull/1700)
 - Updated ComposeUI v4, made cropping optional [#1702](https://github.com/pixelfed/pixelfed/pull/1702)
+- Updated DiscoverController, limit Loops to local only posts [#1703](https://github.com/pixelfed/pixelfed/pull/1703)
 
 ## Deprecated
 - Remove deprecated profile following/followers [#1697](https://github.com/pixelfed/pixelfed/pull/1697)

+ 2 - 1
app/Http/Controllers/DiscoverController.php

@@ -78,8 +78,9 @@ class DiscoverController extends Controller
         abort_if(!config('exp.loops'), 403);
         
         // todo proper pagination, maybe LoopService
-        $res = Cache::remember('discover:loops:recent', now()->addHours(1), function() {
+        $res = Cache::remember('discover:loops:recent', now()->addHours(6), function() {
           $loops = Status::whereType('video')
+                  ->whereNull('uri')
                   ->whereScope('public')
                   ->latest()
                   ->take(18)