Merge pull request #3233 from pixelfed/staging

Staging
This commit is contained in:
daniel 2022-02-12 21:21:13 -07:00 committed by GitHub
commit 3ee2a3528c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 4 deletions

View file

@ -42,6 +42,7 @@
- Updated PostComponent.vue, filter out non-text comments. ([a7346f21](https://github.com/pixelfed/pixelfed/commit/a7346f21))
- Updated Profile.vue component, fix v-once bug. ([4d003d00](https://github.com/pixelfed/pixelfed/commit/4d003d00))
- Updated filesystems config, set S3 visibility to public by default. Fixes #2913. ([49a53c27](https://github.com/pixelfed/pixelfed/commit/49a53c27))
- Updated CommentPipeline, improve parent reply_count calculation. ([ccc94802](https://github.com/pixelfed/pixelfed/commit/ccc94802))
- ([](https://github.com/pixelfed/pixelfed/commit/))
## [v0.11.2 (2022-01-09)](https://github.com/pixelfed/pixelfed/compare/v0.11.1...v0.11.2)

View file

@ -59,10 +59,13 @@ class CommentPipeline implements ShouldQueue
$target = $status->profile;
$actor = $comment->profile;
DB::transaction(function() use($status) {
$status->reply_count = DB::table('statuses')->whereInReplyToId($status->id)->count();
$status->save();
});
if(config('database.default') === 'mysql') {
DB::transaction(function() use($status) {
$count = DB::select( DB::raw("select id, in_reply_to_id from statuses, (select @pv := :kid) initialisation where id > @pv and find_in_set(in_reply_to_id, @pv) > 0 and @pv := concat(@pv, ',', id)"), [ 'kid' => $status->id]);
$status->reply_count = count($count);
$status->save();
});
}
if ($actor->id === $target->id || $status->comments_disabled == true) {
return true;

BIN
public/js/spa.js vendored

Binary file not shown.

Binary file not shown.