Missing commit

This commit is contained in:
Hugh Nimmo-Smith
2024-12-02 12:17:17 +00:00
parent ad2e012560
commit 28d49a42b7

View File

@@ -183,9 +183,9 @@ export class PosthogAnalytics {
const appVersion = import.meta.env.VITE_APP_VERSION || "dev"; const appVersion = import.meta.env.VITE_APP_VERSION || "dev";
return { return {
appVersion, appVersion,
matrixBackend: widget ? "embedded" : "jssdk", matrixBackend: isRunningAsWidget ? "embedded" : "jssdk",
callBackend: "livekit", callBackend: "livekit",
cryptoVersion: widget cryptoVersion: isRunningAsWidget
? undefined ? undefined
: window.matrixclient?.getCrypto()?.getVersion(), : window.matrixclient?.getCrypto()?.getVersion(),
}; };
@@ -237,7 +237,7 @@ export class PosthogAnalytics {
// different devices to send the same ID. // different devices to send the same ID.
let analyticsID = await this.getAnalyticsId(); let analyticsID = await this.getAnalyticsId();
try { try {
if (!analyticsID && !widget) { if (!analyticsID && !isRunningAsWidget) {
// only try setting up a new analytics ID in the standalone app. // 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. // 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<void> { private async setAccountAnalyticsId(analyticsID: string): Promise<void> {
if (!widget) { if (!isRunningAsWidget) {
const client = window.matrixclient; const client = window.matrixclient;
// the analytics ID only needs to be set in the standalone version. // the analytics ID only needs to be set in the standalone version.