diff --git a/vector/src/main/java/im/vector/app/features/analytics/impl/DefaultVectorAnalytics.kt b/vector/src/main/java/im/vector/app/features/analytics/impl/DefaultVectorAnalytics.kt index d32cef604b..62d360f5f7 100644 --- a/vector/src/main/java/im/vector/app/features/analytics/impl/DefaultVectorAnalytics.kt +++ b/vector/src/main/java/im/vector/app/features/analytics/impl/DefaultVectorAnalytics.kt @@ -179,7 +179,7 @@ class DefaultVectorAnalytics @Inject constructor( posthog?.identify(REUSE_EXISTING_ID, identity.getProperties().toPostHogProperties(), IGNORED_OPTIONS) } - private fun Map?.toPostHogProperties(): Properties? { + private fun Map?.toPostHogProperties(): Properties? { if (this == null) return null return Properties().apply { diff --git a/vector/src/main/java/im/vector/app/features/analytics/itf/VectorAnalyticsEvent.kt b/vector/src/main/java/im/vector/app/features/analytics/itf/VectorAnalyticsEvent.kt index c6acb3b87a..2797734343 100644 --- a/vector/src/main/java/im/vector/app/features/analytics/itf/VectorAnalyticsEvent.kt +++ b/vector/src/main/java/im/vector/app/features/analytics/itf/VectorAnalyticsEvent.kt @@ -18,5 +18,5 @@ package im.vector.app.features.analytics.itf interface VectorAnalyticsEvent { fun getName(): String - fun getProperties(): Map? + fun getProperties(): Map? } diff --git a/vector/src/main/java/im/vector/app/features/analytics/plan/Identity.kt b/vector/src/main/java/im/vector/app/features/analytics/plan/Identity.kt index 1cc433aa7e..99f1fadfc4 100644 --- a/vector/src/main/java/im/vector/app/features/analytics/plan/Identity.kt +++ b/vector/src/main/java/im/vector/app/features/analytics/plan/Identity.kt @@ -55,9 +55,9 @@ data class Identity( override fun getName() = "Identity" - override fun getProperties(): Map? { - return mutableMapOf().apply { - ftueUseCaseSelection?.let { put("ftueUseCaseSelection", it.name) } + override fun getProperties(): Map? { + return mutableMapOf().apply { + put("ftueUseCaseSelection", null) }.takeIf { it.isNotEmpty() } } }