1
0
Fork 0
forked from mirror/pixelfed

Update LikeController, store status_profile_id and is_comment attributes

This commit is contained in:
Daniel Supernault 2020-12-26 20:18:48 -07:00
parent 7d0f7f7222
commit 799a4cba12
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

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