Commit graph

11 commits

Author SHA1 Message Date
Travis Ralston
f1ac3d2f64 Convert imports to ES6 from CommonJS
This is needed because `require()` means something different in webpack - it ends up importing the module as something we didn't expect (and is occasionally async)
2019-12-22 21:16:06 -07:00
J. Ryan Stinnett
90dbeefcfb Remove unused option for disabling IndexedDB
`createMatrixClient` and surrounding paths support an argument to disable
IndexedDB, but it is never actually used. This removes the option to simplify
the code.
2019-03-26 13:29:04 +00:00
J. Ryan Stinnett
2ac7dd4ca3 Explicitly create cryptoStore in React SDK
The React SDK has a client creation path that starts 2 out of 3 stores, but then
leaves the other one for the JS SDK's default value handling.

We'll soon be adding additional code to check the health of stores, so it would
be simpler to follow and think about if we create them all in one place.
2019-03-22 15:03:03 +00:00
David Baker
18661e042d Fall back to another store if indexeddb start fails
If we can't start indexeddb, fall back to a different store.

Previously we just ignored the exception and ploughed on anyway, on
the assumption that startup() was just for the indexeddb store to
load data anyway, and if that failed it would just do an initial
/sync instead (and also we'd keep trying to save the sync back which
would fail...). Then, in the previous release we started pulling
the settings out of the store on startup, making the assumpton that
the store actually worked, so the read obviously failed and the app
failed to start up.

This makes Riot work in Tor browser / firefox in daft mode again.
2018-10-04 13:40:56 +01:00
David Baker
1ec0f04baf Remove old migration code
...as instructed!
2018-10-03 18:33:34 +01:00
Richard van der Hoff
dff76f7db1
Merge pull request #1552 from matrix-org/t3chguy/header_access_token
Send Access Token in Headers to help prevent it being spit out in errors
2017-11-22 16:44:36 +00:00
Luke Barnard
dad797d4a2 Run linting --fix 2017-11-16 13:19:36 +00:00
Michael Telatynski
44ec57358b
Send Access Token in Headers to help prevent it being spit out in errors
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-10-30 10:40:10 +00:00
Richard van der Hoff
b124ac21fd Fix load failure in firefox when indexedDB is disabled 2017-06-22 15:07:54 +01:00
Richard van der Hoff
e9ab667d29 Use the web worker when clearing js-sdk stores
It turns out that Firefox doesn't let you use indexeddb from private tabs,
*unless* you are *also* in a webworker. We need to either consistently use it
or not use it - so let's use it.
2017-06-21 17:43:34 +01:00
Richard van der Hoff
939f6d0798 Factor createMatrixClient out from MatrixClientPeg
... so that it can be used elsewhere.
2017-06-13 12:46:49 +01:00