diff --git a/app/Services/LikeService.php b/app/Services/LikeService.php index 063266642..20ccac380 100644 --- a/app/Services/LikeService.php +++ b/app/Services/LikeService.php @@ -62,8 +62,16 @@ class LikeService { if(!$status->likes_count) { return $empty; } + $user = request()->user(); - $like = Like::whereStatusId($status->id)->first(); + if($user) { + $like = Like::whereStatusId($status->id) + ->where('profile_id', '!=', $user->profile_id) + ->first(); + } else { + $like = Like::whereStatusId($status->id) + ->first(); + } if(!$like) { return $empty;