about summary refs log tree commit diff
diff options
context:
space:
mode:
authorHailey <me@haileyok.com>2024-05-23 11:52:36 -0700
committerGitHub <noreply@github.com>2024-05-23 19:52:36 +0100
commitaf20229b41bd2dedbbd52ce77b6366a09f751c7b (patch)
treeb2aac67f107dcac4ffc7743699f4d2a582833db0
parent70f190d44f314fa91b860c29e2f04b4955c1b8b2 (diff)
downloadvoidsky-af20229b41bd2dedbbd52ce77b6366a09f751c7b.tar.zst
Add `bundleDate`, `bundleIdentifier` to `StatsigUser` (#4199)
* record event for fetched ota update

* Revert "record event for fetched ota update"

This reverts commit 4b49efe036c0c9605eabf1d5715586d093d60e9e.

* add `bundleDate` to `StatsigUser`

* include `bundleIdentifier` too

* move to `custom`
-rw-r--r--src/lib/statsig/statsig.tsx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/statsig/statsig.tsx b/src/lib/statsig/statsig.tsx
index b7299be8c..6ffca0ab4 100644
--- a/src/lib/statsig/statsig.tsx
+++ b/src/lib/statsig/statsig.tsx
@@ -7,7 +7,7 @@ import {Statsig, StatsigProvider} from 'statsig-react-native-expo'
 import {logger} from '#/logger'
 import {isWeb} from '#/platform/detection'
 import * as persisted from '#/state/persisted'
-import {IS_TESTFLIGHT} from 'lib/app-info'
+import {BUNDLE_DATE, BUNDLE_IDENTIFIER, IS_TESTFLIGHT} from 'lib/app-info'
 import {useSession} from '../../state/session'
 import {timeout} from '../async/timeout'
 import {useNonReactiveCallback} from '../hooks/useNonReactiveCallback'
@@ -22,6 +22,8 @@ type StatsigUser = {
     // This is the place where we can add our own stuff.
     // Fields here have to be non-optional to be visible in the UI.
     platform: 'ios' | 'android' | 'web'
+    bundleIdentifier: string
+    bundleDate: number
     refSrc: string
     refUrl: string
     appLanguage: string
@@ -180,6 +182,8 @@ function toStatsigUser(did: string | undefined): StatsigUser {
       refSrc,
       refUrl,
       platform: Platform.OS as 'ios' | 'android' | 'web',
+      bundleIdentifier: BUNDLE_IDENTIFIER,
+      bundleDate: BUNDLE_DATE,
       appLanguage: languagePrefs.appLanguage,
       contentLanguages: languagePrefs.contentLanguages,
     },