Merge pull request #1703 from pixelfed/staging

Update DiscoverController, limit Loops to local only posts
This commit is contained in:
daniel 2019-09-12 23:55:19 -06:00 committed by GitHub
commit 66d4b9a0bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -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)

View file

@ -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)