forked from mirror/pixelfed
commit
1f1c5da1f5
|
@ -1,6 +1,8 @@
|
||||||
# Release Notes
|
# 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
|
### Added
|
||||||
- WebP Support ([069a0e4a](https://github.com/pixelfed/pixelfed/commit/069a0e4a))
|
- WebP Support ([069a0e4a](https://github.com/pixelfed/pixelfed/commit/069a0e4a))
|
||||||
- Auto Following support for admins ([68aa2540](https://github.com/pixelfed/pixelfed/commit/68aa2540))
|
- 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))
|
- Federate Media Licenses ([14a1367a](https://github.com/pixelfed/pixelfed/commit/14a1367a))
|
||||||
- Archive Posts ([e9ef0c88](https://github.com/pixelfed/pixelfed/commit/e9ef0c88))
|
- Archive Posts ([e9ef0c88](https://github.com/pixelfed/pixelfed/commit/e9ef0c88))
|
||||||
- Polls ([77092200](https://github.com/pixelfed/pixelfed/commit/77092200))
|
- Polls ([77092200](https://github.com/pixelfed/pixelfed/commit/77092200))
|
||||||
|
- Federated Stories (#2895)
|
||||||
|
|
||||||
### Updated
|
### Updated
|
||||||
- Updated PrettyNumber, fix deprecated warning. ([20ec870b](https://github.com/pixelfed/pixelfed/commit/20ec870b))
|
- 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 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 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 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/))
|
- ([](https://github.com/pixelfed/pixelfed/commit/))
|
||||||
|
|
||||||
## [v0.11.0 (2021-06-01)](https://github.com/pixelfed/pixelfed/compare/v0.10.10...v0.11.0)
|
## [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;
|
$limit = $request->input('limit') ?? 3;
|
||||||
$user = $request->user();
|
$user = $request->user();
|
||||||
|
|
||||||
|
Cache::remember('api:v1:timelines:public:cache_check', 3600, function() {
|
||||||
if(PublicTimelineService::count() == 0) {
|
if(PublicTimelineService::count() == 0) {
|
||||||
PublicTimelineService::warmCache(true, 400);
|
PublicTimelineService::warmCache(true, 400);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if ($max) {
|
if ($max) {
|
||||||
$feed = PublicTimelineService::getRankedMaxId($max, $limit);
|
$feed = PublicTimelineService::getRankedMaxId($max, $limit);
|
||||||
|
|
|
@ -36,6 +36,20 @@ class StoryController extends StoryComposeController
|
||||||
abort_if(!config_cache('instance.stories.enabled') || !$request->user(), 404);
|
abort_if(!config_cache('instance.stories.enabled') || !$request->user(), 404);
|
||||||
$pid = $request->user()->profile_id;
|
$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')
|
$s = Story::select('stories.*', 'followers.following_id')
|
||||||
->leftJoin('followers', 'followers.following_id', 'stories.profile_id')
|
->leftJoin('followers', 'followers.following_id', 'stories.profile_id')
|
||||||
->where('followers.profile_id', $pid)
|
->where('followers.profile_id', $pid)
|
||||||
|
@ -43,6 +57,7 @@ class StoryController extends StoryComposeController
|
||||||
->groupBy('followers.following_id')
|
->groupBy('followers.following_id')
|
||||||
->orderByDesc('id')
|
->orderByDesc('id')
|
||||||
->get();
|
->get();
|
||||||
|
}
|
||||||
|
|
||||||
$res = $s->map(function($s) use($pid) {
|
$res = $s->map(function($s) use($pid) {
|
||||||
$profile = AccountService::get($s->profile_id);
|
$profile = AccountService::get($s->profile_id);
|
||||||
|
|
|
@ -65,7 +65,7 @@ class Profile extends Model
|
||||||
|
|
||||||
public function followingCount($short = false)
|
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) {
|
if($this->domain == null && $this->user->settings->show_profile_following_count == false) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ class Profile extends Model
|
||||||
|
|
||||||
public function followerCount($short = false)
|
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) {
|
if($this->domain == null && $this->user->settings->show_profile_follower_count == false) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,11 +48,11 @@ class PublicTimelineService {
|
||||||
|
|
||||||
public static function add($val)
|
public static function add($val)
|
||||||
{
|
{
|
||||||
return;
|
if(self::count() > 400) {
|
||||||
|
if(config('database.redis.client') === 'phpredis') {
|
||||||
if(config('database.redis.client') === 'phpredis' && self::count() > 400) {
|
|
||||||
Redis::zpopmin(self::CACHE_KEY);
|
Redis::zpopmin(self::CACHE_KEY);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return Redis::zadd(self::CACHE_KEY, $val, $val);
|
return Redis::zadd(self::CACHE_KEY, $val, $val);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ return [
|
||||||
| This value is the version of your Pixelfed instance.
|
| 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
|
@ -29,7 +29,7 @@
|
||||||
"/js/rempro.js": "/js/rempro.js?id=4608c76dfbfb77f259a7",
|
"/js/rempro.js": "/js/rempro.js?id=4608c76dfbfb77f259a7",
|
||||||
"/js/search.js": "/js/search.js?id=68156d01717856b142ea",
|
"/js/search.js": "/js/search.js?id=68156d01717856b142ea",
|
||||||
"/js/status.js": "/js/status.js?id=a9ea8019f0891c03452b",
|
"/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/story-compose.js": "/js/story-compose.js?id=34b9e22a404107475f2e",
|
||||||
"/js/theme-monokai.js": "/js/theme-monokai.js?id=498da56ab16309f277e7",
|
"/js/theme-monokai.js": "/js/theme-monokai.js?id=498da56ab16309f277e7",
|
||||||
"/js/timeline.js": "/js/timeline.js?id=21857714f1b6b5a1bc78"
|
"/js/timeline.js": "/js/timeline.js?id=21857714f1b6b5a1bc78"
|
||||||
|
|
Loading…
Reference in New Issue