mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 06:21:27 +00:00
commit
1f1c5da1f5
8 changed files with 39 additions and 18 deletions
|
@ -1,6 +1,8 @@
|
|||
# Release Notes
|
||||
|
||||
## [Unreleased](https://github.com/pixelfed/pixelfed/compare/v0.11.0...dev)
|
||||
## [Unreleased](https://github.com/pixelfed/pixelfed/compare/v0.11.1...dev)
|
||||
|
||||
## [v0.11.1 (2021-09-07)](https://github.com/pixelfed/pixelfed/compare/v0.11.0...v0.11.1)
|
||||
### Added
|
||||
- WebP Support ([069a0e4a](https://github.com/pixelfed/pixelfed/commit/069a0e4a))
|
||||
- Auto Following support for admins ([68aa2540](https://github.com/pixelfed/pixelfed/commit/68aa2540))
|
||||
|
@ -11,6 +13,7 @@
|
|||
- Federate Media Licenses ([14a1367a](https://github.com/pixelfed/pixelfed/commit/14a1367a))
|
||||
- Archive Posts ([e9ef0c88](https://github.com/pixelfed/pixelfed/commit/e9ef0c88))
|
||||
- Polls ([77092200](https://github.com/pixelfed/pixelfed/commit/77092200))
|
||||
- Federated Stories (#2895)
|
||||
|
||||
### Updated
|
||||
- Updated PrettyNumber, fix deprecated warning. ([20ec870b](https://github.com/pixelfed/pixelfed/commit/20ec870b))
|
||||
|
@ -108,6 +111,7 @@
|
|||
- Updated Profile, fix following count bug. ([ee9f0795](https://github.com/pixelfed/pixelfed/commit/ee9f0795))
|
||||
- Updated DirectMessageController, fix autocomplete bug. ([0f00be4d](https://github.com/pixelfed/pixelfed/commit/0f00be4d))
|
||||
- Updated StoryService, fix division by zero bug. ([6ae1ba0a](https://github.com/pixelfed/pixelfed/commit/6ae1ba0a))
|
||||
- Updated ApiV1Controller, fix empty public timeline bug. ([0584f9ee](https://github.com/pixelfed/pixelfed/commit/0584f9ee))
|
||||
- ([](https://github.com/pixelfed/pixelfed/commit/))
|
||||
|
||||
## [v0.11.0 (2021-06-01)](https://github.com/pixelfed/pixelfed/compare/v0.10.10...v0.11.0)
|
||||
|
|
|
@ -1486,9 +1486,11 @@ class ApiV1Controller extends Controller
|
|||
$limit = $request->input('limit') ?? 3;
|
||||
$user = $request->user();
|
||||
|
||||
Cache::remember('api:v1:timelines:public:cache_check', 3600, function() {
|
||||
if(PublicTimelineService::count() == 0) {
|
||||
PublicTimelineService::warmCache(true, 400);
|
||||
}
|
||||
});
|
||||
|
||||
if ($max) {
|
||||
$feed = PublicTimelineService::getRankedMaxId($max, $limit);
|
||||
|
|
|
@ -36,6 +36,20 @@ class StoryController extends StoryComposeController
|
|||
abort_if(!config_cache('instance.stories.enabled') || !$request->user(), 404);
|
||||
$pid = $request->user()->profile_id;
|
||||
|
||||
if(config('database.default') == 'pgsql') {
|
||||
$s = Story::select('stories.*', 'followers.following_id')
|
||||
->leftJoin('followers', 'followers.following_id', 'stories.profile_id')
|
||||
->where('followers.profile_id', $pid)
|
||||
->where('stories.active', true)
|
||||
->get()
|
||||
->map(function($s) {
|
||||
$r = new \StdClass;
|
||||
$r->id = $s->id;
|
||||
$r->profile_id = $s->profile_id;
|
||||
return $r;
|
||||
})
|
||||
->unique('profile_id');
|
||||
} else {
|
||||
$s = Story::select('stories.*', 'followers.following_id')
|
||||
->leftJoin('followers', 'followers.following_id', 'stories.profile_id')
|
||||
->where('followers.profile_id', $pid)
|
||||
|
@ -43,6 +57,7 @@ class StoryController extends StoryComposeController
|
|||
->groupBy('followers.following_id')
|
||||
->orderByDesc('id')
|
||||
->get();
|
||||
}
|
||||
|
||||
$res = $s->map(function($s) use($pid) {
|
||||
$profile = AccountService::get($s->profile_id);
|
||||
|
|
|
@ -65,7 +65,7 @@ class Profile extends Model
|
|||
|
||||
public function followingCount($short = false)
|
||||
{
|
||||
$count = Cache::remember('profile:following_count:v1:'.$this->id, now()->addMonths(1), function() {
|
||||
$count = Cache::remember('profile:following_count:'.$this->id, now()->addMonths(1), function() {
|
||||
if($this->domain == null && $this->user->settings->show_profile_following_count == false) {
|
||||
return 0;
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ class Profile extends Model
|
|||
|
||||
public function followerCount($short = false)
|
||||
{
|
||||
$count = Cache::remember('profile:follower_count:v1:'.$this->id, now()->addMonths(1), function() {
|
||||
$count = Cache::remember('profile:follower_count:'.$this->id, now()->addMonths(1), function() {
|
||||
if($this->domain == null && $this->user->settings->show_profile_follower_count == false) {
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -48,11 +48,11 @@ class PublicTimelineService {
|
|||
|
||||
public static function add($val)
|
||||
{
|
||||
return;
|
||||
|
||||
if(config('database.redis.client') === 'phpredis' && self::count() > 400) {
|
||||
if(self::count() > 400) {
|
||||
if(config('database.redis.client') === 'phpredis') {
|
||||
Redis::zpopmin(self::CACHE_KEY);
|
||||
}
|
||||
}
|
||||
|
||||
return Redis::zadd(self::CACHE_KEY, $val, $val);
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ return [
|
|||
| This value is the version of your Pixelfed instance.
|
||||
|
|
||||
*/
|
||||
'version' => '0.11.0',
|
||||
'version' => '0.11.1',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
BIN
public/js/stories.js
vendored
BIN
public/js/stories.js
vendored
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue