diff --git a/packages/features/ee/support/lib/intercom/useIntercom.ts b/packages/features/ee/support/lib/intercom/useIntercom.ts index bbf6391f37..76e7a68e1d 100644 --- a/packages/features/ee/support/lib/intercom/useIntercom.ts +++ b/packages/features/ee/support/lib/intercom/useIntercom.ts @@ -35,9 +35,9 @@ export const useIntercom = () => { } hookData.boot({ - name: data?.name ?? "", - email: data?.email, - userId: String(data?.id), + ...(data && data?.name && { name: data.name }), + ...(data && data?.email && { email: data.email }), + ...(data && data?.id && { userId: data.id }), createdAt: String(dayjs(data?.createdDate).unix()), ...(userHash && { userHash }), customAttributes: { @@ -50,6 +50,7 @@ export const useIntercom = () => { has_paid_plan: hasPaidPlan, has_team_plan: hasTeamPlan, metadata: data?.metadata, + is_logged_in: !!data, }, }); hookData.show();