diff --git a/app/Services/Social/Telegram/TelegramAnalytics.php b/app/Services/Social/Telegram/TelegramAnalytics.php index c21d8075..395f2e9a 100644 --- a/app/Services/Social/Telegram/TelegramAnalytics.php +++ b/app/Services/Social/Telegram/TelegramAnalytics.php @@ -51,7 +51,9 @@ public function getMetrics(SocialAccount $account): array public function fetchPostMetrics(PostPlatform $postPlatform): array { $account = $postPlatform->socialAccount; - $metrics = $account ? $this->getMetrics($account) : []; + $metrics = $account + ? array_map(fn (array $metric): array => [...$metric, 'kind' => 'subscribers'], $this->getMetrics($account)) + : []; $reactions = data_get($postPlatform->meta, 'reactions', []); diff --git a/resources/js/components/posts/PostPlatformMetrics.vue b/resources/js/components/posts/PostPlatformMetrics.vue index 54ea70ba..65946d83 100644 --- a/resources/js/components/posts/PostPlatformMetrics.vue +++ b/resources/js/components/posts/PostPlatformMetrics.vue @@ -1,8 +1,14 @@