by fixing the cause rather than the symptom: this upgrades the code to use the new, recommended JSX transform mode of React 17+, which no longer requires you to import React manually just to write JSX.
PostHog was expecting the matrix client object to be initialised at
the point it ran its setup, which wasn't the case. Check to see if it's
there on login and add an onLoginStatusChanged hook that to re-check.
Also make a few methods private that didn't need to be public.
Also fix a few instances where the OpenTelemetry group call tried to
report metrics using a tracer which didn't exist anymore, if the user
disabled analytics and then joined the same call again.
* load analytics id from url in embedded mode
Signed-off-by: Timo K <timok@element.io>
* add start call in the widget code path
Signed-off-by: Timo K <timok@element.io>
* send group call id instead of call name
Signed-off-by: Timo K <timok@element.io>
* generate analyticsid based on account analyticsid
This make it impossible to find users from the element web posthog instance
in the element call instance
* move registration type setup PosthogAnalytics.ts
* Order identificaition and tracking.
This fixes an issue that the widget version did not identify the user before sneding
the first track event.
Because start call is called right after app startup.
Signed-off-by: Timo K <timok@element.io>
Add a check to ensure that we find crypto data in the crypto store
when we're restoring a session and otherwise abort the session restore.
This will prevent us from restoring a session and generating new keys
when there was a previous session with different keys.
***This will force a logout for all users***
See the linked issue (and the comment in code) for more detail.
Fixes https://github.com/vector-im/element-call/issues/464