You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-08-07 21:23:00 +03:00
Refactor platform properties loading
This commit is contained in:
@@ -48,7 +48,7 @@ import { Jitsi } from "./widgets/Jitsi";
|
||||
import { SSO_HOMESERVER_URL_KEY, SSO_ID_SERVER_URL_KEY, SSO_IDP_ID_KEY } from "./BasePlatform";
|
||||
import ThreepidInviteStore from "./stores/ThreepidInviteStore";
|
||||
import CountlyAnalytics from "./CountlyAnalytics";
|
||||
import { getAnalytics } from "./PosthogAnalytics";
|
||||
import { Anonymity, getAnalytics, getPlatformProperties } from "./PosthogAnalytics";
|
||||
import CallHandler from './CallHandler';
|
||||
import LifecycleCustomisations from "./customisations/Lifecycle";
|
||||
import ErrorDialog from "./components/views/dialogs/ErrorDialog";
|
||||
@@ -574,6 +574,14 @@ async function doSetLoggedIn(
|
||||
await abortLogin();
|
||||
}
|
||||
|
||||
if (SettingsStore.getValue("analyticsOptIn")) {
|
||||
const analytics = getAnalytics();
|
||||
analytics.setAnonymity(Anonymity.Pseudonymous);
|
||||
await analytics.identifyUser(credentials.userId);
|
||||
} else {
|
||||
getAnalytics().setAnonymity(Anonymity.Anonymous);
|
||||
}
|
||||
|
||||
Analytics.setLoggedIn(credentials.guest, credentials.homeserverUrl);
|
||||
|
||||
MatrixClientPeg.replaceUsingCreds(credentials);
|
||||
|
Reference in New Issue
Block a user