Skip to content

Commit 93af6da

Browse files
committed
get all tests passing
1 parent ebe5bef commit 93af6da

File tree

2 files changed

+21
-10
lines changed

2 files changed

+21
-10
lines changed

posthog/src/main/java/com/posthog/PostHog.kt

+15-4
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,6 @@ public class PostHog private constructor(
294294
}
295295

296296
props["\$is_identified"] = isIdentified
297-
298-
props["\$process_person_profile"] = hasPersonProcessing()
299297
}
300298

301299
// Session replay should have the SDK info as well
@@ -394,7 +392,14 @@ public class PostHog private constructor(
394392
return
395393
}
396394

397-
super.captureStateless(event, newDistinctId, properties, userProperties, userPropertiesSetOnce, groups)
395+
super.captureStateless(
396+
event,
397+
newDistinctId,
398+
sanitizedProperties,
399+
userProperties,
400+
userPropertiesSetOnce,
401+
groups
402+
)
398403
} catch (e: Throwable) {
399404
config?.logger?.log("Capture failed: $e.")
400405
}
@@ -472,7 +477,13 @@ public class PostHog private constructor(
472477
isIdentified = true
473478
}
474479

475-
super.identify(distinctId, userProperties, userPropertiesSetOnce)
480+
capture(
481+
"\$identify",
482+
distinctId = distinctId,
483+
properties = props,
484+
userProperties = userProperties,
485+
userPropertiesSetOnce = userPropertiesSetOnce
486+
)
476487

477488
if (config?.reuseAnonymousId != true) {
478489
// We keep the AnonymousId to be used by decide calls and identify to link the previousId

posthog/src/main/java/com/posthog/PostHogStateless.kt

+6-6
Original file line numberDiff line numberDiff line change
@@ -358,14 +358,14 @@ public open class PostHogStateless protected constructor(
358358
)
359359
}
360360

361-
protected fun hasPersonProcessing(): Boolean {
361+
private fun hasPersonProcessing(): Boolean {
362362
return !(
363-
config?.personProfiles == PersonProfiles.NEVER ||
364-
(
365-
config?.personProfiles == PersonProfiles.IDENTIFIED_ONLY &&
366-
!isPersonProcessingEnabled
363+
config?.personProfiles == PersonProfiles.NEVER ||
364+
(
365+
config?.personProfiles == PersonProfiles.IDENTIFIED_ONLY &&
366+
!isPersonProcessingEnabled
367+
)
367368
)
368-
)
369369
}
370370

371371
protected fun requirePersonProcessing(

0 commit comments

Comments
 (0)