1
0
Fork 0

Merge pull request #2919 from pixelfed/staging

v0.11.1
This commit is contained in:
daniel 2021-09-07 21:21:55 -06:00 committed by GitHub
commit 1f1c5da1f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 41 additions and 20 deletions

View File

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

View File

@ -1486,9 +1486,11 @@ class ApiV1Controller extends Controller
$limit = $request->input('limit') ?? 3;
$user = $request->user();
if(PublicTimelineService::count() == 0) {
PublicTimelineService::warmCache(true, 400);
}
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);

View File

@ -36,13 +36,28 @@ class StoryController extends StoryComposeController
abort_if(!config_cache('instance.stories.enabled') || !$request->user(), 404);
$pid = $request->user()->profile_id;
$s = Story::select('stories.*', 'followers.following_id')
->leftJoin('followers', 'followers.following_id', 'stories.profile_id')
->where('followers.profile_id', $pid)
->where('stories.active', true)
->groupBy('followers.following_id')
->orderByDesc('id')
->get();
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)
->where('stories.active', true)
->groupBy('followers.following_id')
->orderByDesc('id')
->get();
}
$res = $s->map(function($s) use($pid) {
$profile = AccountService::get($s->profile_id);

View File

@ -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;
}

View File

@ -48,10 +48,10 @@ class PublicTimelineService {
public static function add($val)
{
return;
if(config('database.redis.client') === 'phpredis' && self::count() > 400) {
Redis::zpopmin(self::CACHE_KEY);
if(self::count() > 400) {
if(config('database.redis.client') === 'phpredis') {
Redis::zpopmin(self::CACHE_KEY);
}
}
return Redis::zadd(self::CACHE_KEY, $val, $val);

View File

@ -23,7 +23,7 @@ return [
| This value is the version of your Pixelfed instance.
|
*/
'version' => '0.11.0',
'version' => '0.11.1',
/*
|--------------------------------------------------------------------------

File diff suppressed because one or more lines are too long

View File

@ -29,7 +29,7 @@
"/js/rempro.js": "/js/rempro.js?id=4608c76dfbfb77f259a7",
"/js/search.js": "/js/search.js?id=68156d01717856b142ea",
"/js/status.js": "/js/status.js?id=a9ea8019f0891c03452b",
"/js/stories.js": "/js/stories.js?id=c4771dc89bc9ac342998",
"/js/stories.js": "/js/stories.js?id=94721cbf86251179e7f7",
"/js/story-compose.js": "/js/story-compose.js?id=34b9e22a404107475f2e",
"/js/theme-monokai.js": "/js/theme-monokai.js?id=498da56ab16309f277e7",
"/js/timeline.js": "/js/timeline.js?id=21857714f1b6b5a1bc78"