From da0d5f2a42de3d6539d29dfbdc99965a68d826b5 Mon Sep 17 00:00:00 2001 From: Paulo Castellano Date: Tue, 19 May 2026 19:20:56 -0300 Subject: [PATCH] fix(posthog): simplify user identification and account usage sync Refactor the user identification process by removing unnecessary type casting for user ID and account ID. This change enhances code readability and maintains functionality for syncing account usage. --- app/Jobs/PostHog/SyncUser.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Jobs/PostHog/SyncUser.php b/app/Jobs/PostHog/SyncUser.php index 79cbceaa..c1d355c3 100644 --- a/app/Jobs/PostHog/SyncUser.php +++ b/app/Jobs/PostHog/SyncUser.php @@ -37,7 +37,7 @@ public function handle(PostHogService $postHog): void return; } - $postHog->identify((string) $user->id, [ + $postHog->identify($user->id, [ '$email' => $user->email, '$name' => $user->name, '$set_once' => ['signed_up_at' => $user->created_at?->toIso8601String()], @@ -45,8 +45,8 @@ public function handle(PostHogService $postHog): void if ($user->account_id) { SyncAccountUsage::dispatch( - (string) $user->account_id, - $user->current_workspace_id ? (string) $user->current_workspace_id : null, + $user->account_id, + $user->current_workspace_id ? $user->current_workspace_id : null, ); } }