mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-30 08:53:17 +00:00
commit
7fe9e31941
3 changed files with 45 additions and 35 deletions
|
@ -111,6 +111,11 @@
|
||||||
- Update PostReactions, reduce bookmark timeout to 2s from 5s ([a8094e6c](https://github.com/pixelfed/pixelfed/commit/a8094e6c))
|
- Update PostReactions, reduce bookmark timeout to 2s from 5s ([a8094e6c](https://github.com/pixelfed/pixelfed/commit/a8094e6c))
|
||||||
- Update CollectionController, fixes #3946 ([abd52f4d](https://github.com/pixelfed/pixelfed/commit/abd52f4d))
|
- Update CollectionController, fixes #3946 ([abd52f4d](https://github.com/pixelfed/pixelfed/commit/abd52f4d))
|
||||||
- Update ComposeController, fix add to collection logic ([9f8957b9](https://github.com/pixelfed/pixelfed/commit/9f8957b9))
|
- Update ComposeController, fix add to collection logic ([9f8957b9](https://github.com/pixelfed/pixelfed/commit/9f8957b9))
|
||||||
|
- Update v1.1 api, add post moderation endpoint ([9bbd6dcd](https://github.com/pixelfed/pixelfed/commit/9bbd6dcd))
|
||||||
|
- Update StatusService, on purge remove from NetworkTimelineService cache ([18940cb2](https://github.com/pixelfed/pixelfed/commit/18940cb2))
|
||||||
|
- Update mute/block logic with admin defined limits and improved filtering to skip deleted accounts ([5b879f01](https://github.com/pixelfed/pixelfed/commit/5b879f01))
|
||||||
|
- Update FollowPipeline, fix followers_count and following_count counters ([6153b620](https://github.com/pixelfed/pixelfed/commit/6153b620))
|
||||||
|
- Update ApiV1Controller, fix media update. Fixes #4196 ([f3164650](https://github.com/pixelfed/pixelfed/commit/f3164650))
|
||||||
- ([](https://github.com/pixelfed/pixelfed/commit/))
|
- ([](https://github.com/pixelfed/pixelfed/commit/))
|
||||||
|
|
||||||
## [v0.11.4 (2022-10-04)](https://github.com/pixelfed/pixelfed/compare/v0.11.3...v0.11.4)
|
## [v0.11.4 (2022-10-04)](https://github.com/pixelfed/pixelfed/compare/v0.11.3...v0.11.4)
|
||||||
|
|
|
@ -1628,7 +1628,10 @@ class ApiV1Controller extends Controller
|
||||||
], 429);
|
], 429);
|
||||||
};
|
};
|
||||||
|
|
||||||
return $this->json(MediaService::get($media->status_id));
|
$fractal = new Fractal\Manager();
|
||||||
|
$fractal->setSerializer(new ArraySerializer());
|
||||||
|
$resource = new Fractal\Resource\Item($media, new MediaTransformer());
|
||||||
|
return $this->json($fractal->createData($resource)->toArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -14,45 +14,47 @@ use App\Services\AccountService;
|
||||||
|
|
||||||
class IncrementPostCount implements ShouldQueue
|
class IncrementPostCount implements ShouldQueue
|
||||||
{
|
{
|
||||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||||
|
|
||||||
public $id;
|
public $id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new job instance.
|
* Create a new job instance.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function __construct($id)
|
public function __construct($id)
|
||||||
{
|
{
|
||||||
$this->id = $id;
|
$this->id = $id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute the job.
|
* Execute the job.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
$id = $this->id;
|
$id = $this->id;
|
||||||
|
|
||||||
$profile = Profile::find($id);
|
$profile = Profile::find($id);
|
||||||
|
|
||||||
if(!$profile) {
|
if(!$profile) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($profile->updated_at && $profile->updated_at->lt(now()->subDays(30))) {
|
if($profile->updated_at && $profile->updated_at->lt(now()->subDays(30))) {
|
||||||
$profile->status_count = Status::whereProfileId($id)->whereNull(['in_reply_to_id', 'reblog_of_id'])->count();
|
$profile->status_count = Status::whereProfileId($id)->whereNull(['in_reply_to_id', 'reblog_of_id'])->count();
|
||||||
$profile->save();
|
$profile->last_status_at = now();
|
||||||
AccountService::del($id);
|
$profile->save();
|
||||||
} else {
|
AccountService::del($id);
|
||||||
$profile->status_count = $profile->status_count + 1;
|
} else {
|
||||||
$profile->save();
|
$profile->status_count = $profile->status_count + 1;
|
||||||
AccountService::del($id);
|
$profile->last_status_at = now();
|
||||||
}
|
$profile->save();
|
||||||
|
AccountService::del($id);
|
||||||
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue