Update like api, store status_profile_id and is_comment

This commit is contained in:
Daniel Supernault 2021-06-18 02:57:08 -06:00
parent 8edd829436
commit c8c6b98380
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -817,6 +817,9 @@ class ApiV1Controller extends Controller
]);
if($like->wasRecentlyCreated == true) {
$like->status_profile_id = $status->profile_id;
$like->is_comment = !empty($status->in_reply_to_id);
$like->save();
$status->likes_count = $status->likes()->count();
$status->save();
LikePipeline::dispatch($like);