Contributing: Note that rebase lets you mass signoff commits
replace find loop + slice with a single filter. More readable
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
keep public APIs consistent with previous behaviour now that its fuzzy
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
make tests not fail, because of order of occurrence
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
do falsey displayname check regardless of whether we have roomstate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
add tests for the fuzzy disambiguation between members in a room
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
remove duplicated call
Standardize on importing `olm-loader` rather than pasting the same boilerplate
in different tests. Importantly, `spec/unit/crypto.spec.js` did not include any
loading approach, so it would only find Olm if some other test loaded it first.
Signed-off-by: J. Ryan Stinnett <jryans@gmail.com>
* Support .well-known autodiscovery in the js-sdk
It's much more useful here than in the react-sdk as it can be reused by more applications. This is also required to make the react-sdk a little easier to manage .well-known lookups as soon it'll be doing it in several places.
Automatic discovery is an abstract concept in the spec and could include more than .well-known in the future, so this is made to be generic enough to support future mechanisms and other resources to discover. There's also a ton of comments (more than normally needed) as people may wish to use this as a reference in their own implementation and it doesn't hurt to explain what everything is doing.
Many of the functions are air lifted from the react-sdk and modified to work within the confines of the js-sdk.
* Swap out uglify-js for uglify-es
So we can start using ES6 dependencies without figuring out how to update babel.
`uglify-es` is compatible with `uglify-js@3` (we were using `@2`) , which is why the same command is used. This commit includes changes to the command line to make the thing run the same as before too.
* Appease the linter
* Appease the linter some more
* Appease the linter: the tiebreaker
* Appease the linter yet again
* Switch to using the already available URL libraries
* Remove excess logging
* Start a new Olm sessions with a device when we get an undecryptable
message on it.
* Send a dummy message on that sessions such that the other end knows
about it.
* Re-send any outstanding keyshare requests for that device.
Also includes a unit test for megolm that isn't very related but came
out as a result anyway.
Includes https://github.com/matrix-org/matrix-js-sdk/pull/776
Fixes https://github.com/vector-im/riot-web/issues/3822
wasm Olm has a new interface: it now has an init method that needs
to be called and the promise it returns waited on before the Olm
module is used. Support that, and allow Crypto etc to be imported
whether Olm is enabled or not. Change whether olm is enabled to
be async since now it will be unavailable if the async module init
fails. Don't call getOlmVersion() until the Olm.init() is done.