Add user property for rust to help analytics

This commit is contained in:
valere 2023-05-11 10:48:51 +02:00
parent 1a1f6810e2
commit b2a21f7cc8
1 changed files with 4 additions and 0 deletions

View File

@ -19,6 +19,7 @@ package im.vector.app.features.analytics.impl
import com.posthog.android.Options
import com.posthog.android.PostHog
import com.posthog.android.Properties
import im.vector.app.BuildConfig
import im.vector.app.core.di.NamedGlobalScope
import im.vector.app.features.analytics.AnalyticsConfig
import im.vector.app.features.analytics.VectorAnalytics
@ -214,6 +215,9 @@ class DefaultVectorAnalytics @Inject constructor(
private fun Map<String, Any?>.toPostHogUserProperties(): Properties {
return Properties().apply {
putAll(this@toPostHogUserProperties.filter { it.value != null })
if (BuildConfig.FLAVOR == "rustCrypto") {
put("crypto", "rust")
}
}
}