As per comment, we can't use workers in Vite dev mode. We previously
fell back to the memory store but this ends up with it working significantly
differently in dev mode to production, eg. dev mode would always start
by doing an initial sync, so old to-device messages would arrive again.
There's no need to fall all the way back to the memory store though,
we can use the IndexedDB store without the worker.
This is an Element project (in the vector-im repo) so the Copyright
should be for New Vector: it was incorrectly attributed to the
foundation for some files (and some files were missing headers).
React 18's strict mode intentionally mounts all components twice, which was causing Olm to get double-loaded. Also, it doesn't need to be loaded if the app is running as a widget.
We weren't waiting for rooms to arrive down the sync stream after
joining them but before trying to use them.
More regression details in linked issue.
Fixes https://github.com/vector-im/element-call/issues/477
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
The room alias is not part of the spec. Synapse returns it anyway,
but it's not part of the js-sdk types. We don't really need the
server to tell us what the alias is, so just generate it locally
instead.