mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-24 16:53:17 +00:00
Update LikeController, store status_profile_id and is_comment attributes
This commit is contained in:
parent
7d0f7f7222
commit
799a4cba12
1 changed files with 9 additions and 0 deletions
|
@ -43,6 +43,15 @@ class LikeController extends Controller
|
|||
if($like->wasRecentlyCreated == true) {
|
||||
$count++;
|
||||
$status->likes_count = $count;
|
||||
$like->status_profile_id = $status->profile_id;
|
||||
$like->is_comment = in_array($status->type, [
|
||||
'photo',
|
||||
'photo:album',
|
||||
'video',
|
||||
'video:album',
|
||||
'photo:video:album'
|
||||
]) == false;
|
||||
$like->save();
|
||||
$status->save();
|
||||
LikePipeline::dispatch($like);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue