diff --git a/app/Services/LikeService.php b/app/Services/LikeService.php index 36f31ee44..a1bdeb55f 100644 --- a/app/Services/LikeService.php +++ b/app/Services/LikeService.php @@ -71,9 +71,16 @@ class LikeService { $id = $like->profile_id; - return [ + $res = [ 'username' => ProfileService::get($id)['username'], 'others' => $status->likes_count >= 5, ]; + + if(request()->user()->profile_id == $status->profile_id) { + $res['total_count'] = $status->likes_count; + $res['total_count_pretty'] = number_format($res['total_count']); + } + + return $res; } } diff --git a/resources/assets/js/components/Timeline.vue b/resources/assets/js/components/Timeline.vue index ca5a3b8b5..fc7b387a0 100644 --- a/resources/assets/js/components/Timeline.vue +++ b/resources/assets/js/components/Timeline.vue @@ -228,7 +228,7 @@ Liked by {{status.liked_by.username}} - and others + and {{status.liked_by.total_count_pretty}} others