-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for to-device messages via OLM #303
Conversation
src/matrix-utils.js
Outdated
export async function initClient(clientOptions) { | ||
await addScript(olmJsPath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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