Skip to content

Commit

Permalink
Merge pull request pixelfed#1703 from pixelfed/staging
Browse files Browse the repository at this point in the history
Update DiscoverController, limit Loops to local only posts
  • Loading branch information
dansup authored Sep 13, 2019
2 parents 198ec14 + 95f96aa commit 66d4b9a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion app/Http/Controllers/DiscoverController.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@ public function loopsApi(Request $request)
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)
Expand Down

0 comments on commit 66d4b9a

Please sign in to comment.