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.
This commit is contained in:
parent
ccd78e3c8d
commit
da0d5f2a42
1 changed files with 3 additions and 3 deletions
|
|
@ -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,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue