Check that /thirdparty/protocols gives us an object (rather than a string, for
instance). I saw a test explode, apparently because it gave us a string. Which
is odd, but in general we ought to be sanity-checking the things coming back
from the server.
If we get an error when connecting to th indexeddb, fall back to a
MemoryCryptoStore.
This takes a bit of reorganising, because we don't get the error until we try
to connect to the database.
Hopefully this will fix the vector-web test failures (the
OutgoingRoomRequestManager throws an exception because the indexeddb is being
deleted just as it's getting started).
when we receive a m.forwarded_room_key, add it to the crypto store, but
remember who forwarded it to us, so we can decide whether to trust them
separately.
Rearrange the way _getInboundGroupSession and _saveInboundGroupSession work, so
that we can add more things to the storage without growing the parameter list
forever.
These terms were somewhat confusing (and, in the case of megolm, misleading),
so replace them with explicit senderCurve25519Key and claimedEd25519Key fields.
If we have the events in memory, let TimelineWindow.load() return
a resolved promise, so that the UI can show the view straight away instead
of showing the spinner.
* Add API for POST /user_directory/search
This takes a JSON body of the form:
```json
{
"term": "search term",
"limit": 42,
}
```
where "term" is the term to match against user IDs, display names and domains and "limit" is the maximum number of results to return (which is defaulted server-side).
The response body looks like
```json
{
"results ": [
{ "user_id": "@someid:mydomain.com", "display_name": "Some Name", "avatar_url": "mx://..." },
...
],
"limited": false
}
```
where "limited" indicates whether the "limit" was used to truncate the list.
Use single room object for duration of peek
Instead of getting the room by ID every time the room is polled for events, which could cause issues if the state of the room is modified from under the peeking logic (if the user joined the room or registered etc.)
Convert base to an es6 module with es6 classes, for clarity and to help with
jsdoccing.
Complications are:
* jsdoc gets confused by `export class`, so the exports are separated.
* turns out that extending Error is a bit difficult, so instanceof doesn't work
on derived Error classes. This only really affects us in one place (app-side
code shouldn't be doing instanceofs anyway), so just use `name` instead.