From 28d49a42b73b7fb08f9d61e4211b5041773207a6 Mon Sep 17 00:00:00 2001 From: Hugh Nimmo-Smith Date: Mon, 2 Dec 2024 12:17:17 +0000 Subject: [PATCH] Missing commit --- src/analytics/PosthogAnalytics.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/analytics/PosthogAnalytics.ts b/src/analytics/PosthogAnalytics.ts index c93d0450..40b0daef 100644 --- a/src/analytics/PosthogAnalytics.ts +++ b/src/analytics/PosthogAnalytics.ts @@ -183,9 +183,9 @@ export class PosthogAnalytics { const appVersion = import.meta.env.VITE_APP_VERSION || "dev"; return { appVersion, - matrixBackend: widget ? "embedded" : "jssdk", + matrixBackend: isRunningAsWidget ? "embedded" : "jssdk", callBackend: "livekit", - cryptoVersion: widget + cryptoVersion: isRunningAsWidget ? undefined : window.matrixclient?.getCrypto()?.getVersion(), }; @@ -237,7 +237,7 @@ export class PosthogAnalytics { // different devices to send the same ID. let analyticsID = await this.getAnalyticsId(); try { - if (!analyticsID && !widget) { + if (!analyticsID && !isRunningAsWidget) { // only try setting up a new analytics ID in the standalone app. // Couldn't retrieve an analytics ID from user settings, so create one and set it on the server. @@ -302,7 +302,7 @@ export class PosthogAnalytics { } private async setAccountAnalyticsId(analyticsID: string): Promise { - if (!widget) { + if (!isRunningAsWidget) { const client = window.matrixclient; // the analytics ID only needs to be set in the standalone version.