Commit Graph

40 Commits

Author SHA1 Message Date
David Baker
5f26534496 Use IndexedDB storage in dev mode, just without the worker
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.
2023-01-12 15:17:46 +00:00
David Baker
df9c1fed2a Fix copyright headers
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).
2023-01-03 16:55:26 +00:00
David Baker
96de515e56 Move default homeserver to config file 2022-12-20 17:26:45 +00:00
David Baker
ab860b8655
Use logger
Co-authored-by: Robin <robin@robin.town>
2022-11-10 21:43:49 +00:00
David Baker
f69e032a52
Use logger (and fix typo)
Co-authored-by: Robin <robin@robin.town>
2022-11-10 21:43:40 +00:00
David Baker
bd08166a50 Make room / call creation logging more accurate
It said it was creating the room when actually it was creating the call
2022-11-10 19:10:10 +00:00
Robin Townsend
093bf7c1a1 Fix blurry avatars 2022-11-02 23:12:43 -04:00
Robin Townsend
d4caa1585b Ensure that Olm is only loaded once
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.
2022-10-31 13:43:03 -04:00
Šimon Brandner
66ecb7c4e9
Merge pull request #667 from vector-im/SimonBrandner/feat/ice-fallback 2022-10-26 17:52:44 +02:00
Šimon Brandner
c4c99c4bcb
Use a better var name
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2022-10-26 14:27:41 +02:00
Šimon Brandner
cef88e2894
Add option to allow ICE server fallback
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2022-10-26 13:58:41 +02:00
Šimon Brandner
fcaa126147
Add jest
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2022-10-26 13:21:06 +02:00
Robin Townsend
8524b9ecd6 Set up translation with i18next 2022-10-12 14:53:49 -04:00
Robin Townsend
f0045c9406 Initialize all widget-related things at the top level 2022-09-09 02:09:12 -04:00
Robin Townsend
ba4258aa89 Fix the call type selector 2022-08-18 18:48:17 -04:00
Robin Townsend
2a1689009a Extract state event capabilities into a variable 2022-08-09 09:43:12 -04:00
Robin Townsend
549c54e311 Request fewer permissions 2022-07-28 16:26:14 -04:00
Robin Townsend
cf56b24dda Add a URL param for room ID
And consolidate our URL params logic
2022-07-27 16:31:48 -04:00
Robin Townsend
2a8cb3c4e2 Merge branch 'main' into matroska 2022-07-26 14:58:40 -04:00
David Baker
32b37ed8f0 Fix 'cannot find room' error
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
2022-07-20 16:01:29 +01:00
Robin Townsend
689835cc17 Merge branch 'main' into matroska 2022-07-15 16:56:52 -04:00
Robin Townsend
3fc8fe505b Merge branch 'main' into matroska 2022-07-15 14:38:12 -04:00
Robin Townsend
982398b32f Remove unnecessary complexity from createRoom
With fae4c504c9, the changes from
b4a56f6dd7 are no longer necessary.
2022-07-15 13:05:06 -04:00
Robin Townsend
fae4c504c9 Consolidate all group call creation into useLoadGroupCall
This enables us to automatically create a group call in rooms that
exist, but contain no calls.
2022-07-15 12:59:54 -04:00
Robin Townsend
b4a56f6dd7 Wait for the created room to come down sync before placing a group call 2022-07-15 11:31:52 -04:00
David Baker
873e68e1e1 Add notes from thinking through the need for storing what crypto db we use 2022-07-14 13:24:22 +01:00
David Baker
4c145af7a3 Don't restore session unless crypto data is found
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
2022-07-14 13:07:30 +01:00
Robin Townsend
7fab4ca1ba Merge branch 'main' into matroska 2022-07-13 15:54:06 -04:00
David Baker
6b03ae0dc3
Use the traditional syntax for not-equals
Co-authored-by: Šimon Brandner <simon.bra.ag@gmail.com>
2022-07-04 20:32:20 +01:00
David Baker
5dd5668389 Add config param to disable e2e for signalling 2022-07-04 20:10:13 +01:00
Robin Townsend
d5e638c8f7 WIP 2022-06-27 17:41:07 -04:00
Robin Townsend
122ffeeab5 Update matrix-js-sdk 2022-06-21 11:32:07 -04:00
David Baker
582e6637dc Merge remote-tracking branch 'origin/main' into dbkr/lower_sdk_timeout 2022-06-01 16:02:48 +01:00
David Baker
f07ee54e05
Finish sentence
Co-authored-by: Robin <robin@robin.town>
2022-06-01 10:04:49 +01:00
David Baker
2cf40ff0b8 Fix room creation
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.
2022-06-01 09:29:47 +01:00
David Baker
9edc1acc90 Add type to indexeddb variable 2022-06-01 09:07:00 +01:00
David Baker
7ed2f9bd9a Lower timeout on js-sdk API call to 5s 2022-05-30 11:46:27 +01:00
David Baker
2cdbeb6f12 Fix imports 2022-05-30 11:41:59 +01:00
David Baker
7bd95621f1 More types 2022-05-30 11:28:16 +01:00
David Baker
a05501a909 Convert matrix-utils to typescript 2022-05-30 10:09:13 +01:00