Conversation
src/matrix-utils.js
Outdated
| } | ||
|
|
||
| export async function initClient(clientOptions) { | ||
| await addScript(olmJsPath); |
There was a problem hiding this comment.
Is this necessary as well as the hardcoded script addition in index.html? I think you should be able to import Olm as a module to avoid both (https://github.com/vector-im/element-web/blob/develop/src/vector/init.tsx#L87).
There was a problem hiding this comment.
Ok, I've made a change to import it that way. One gotcha I found is that @matrix-org/olm expects OLM_OPTIONS to exist in the global context. Not sure why.
There was a problem hiding this comment.
I've added an issue to the Olm repository here https://gitlab.matrix.org/matrix-org/olm/-/issues/10
There was a problem hiding this comment.
Thanks - needing OLM_OPTIONS defined is a bit weird - we don't seem to need it in element-web - not sure why though.
|
|
||
| const storeOpts = {}; | ||
|
|
||
| if (indexedDB && localStorage && !import.meta.env.DEV) { |
There was a problem hiding this comment.
Fwiw I think the bit you need is the crypto store below - this shouldn't really be necessary to get crypto working (although it will speed up your subsequent loads).
There was a problem hiding this comment.
Yeah Matthew and I discussed adding this to Element Call so I figured it was good to do it here in addition to the crypto store.
|
So we have a staging environment setup on main now. Should we merge this and test it out? |
Depends on matrix-org/matrix-js-sdk#2322