Skip to content

Commit

Permalink
Update like api, store status_profile_id and is_comment
Browse files Browse the repository at this point in the history
  • Loading branch information
dansup committed Jun 18, 2021
1 parent 8edd829 commit c8c6b98
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/Http/Controllers/Api/ApiV1Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,9 @@ public function statusFavouriteById(Request $request, $id)
]);

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);
Expand Down

0 comments on commit c8c6b98

Please sign in to comment.