1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-08-07 23:02:56 +03:00
Commit Graph

5348 Commits

Author SHA1 Message Date
David Baker
bafe9c06d4 Move more functionality to the indexeddb backend
Now the backend drives the sync accumulator as well. Also moves
the backend out to a separate file.
2017-04-04 16:25:58 +01:00
David Baker
47a0398b62 Remove other two lines 2017-04-04 10:43:57 +01:00
David Baker
11f5ae3c20 Merge remote-tracking branch 'origin/dbkr/indexeddb_hide_internals' into dbkr/indexeddb_refactor_2 2017-04-04 10:39:23 +01:00
David Baker
f72884ac19 Spelling 2017-04-04 10:36:31 +01:00
David Baker
b72b38b0a3 Add missed methods to stub/memory store
and fix tests
2017-04-03 17:45:58 +01:00
David Baker
6a2465329a Add jsdoc 2017-04-03 17:12:30 +01:00
David Baker
4cb80588e9 Merge branch 'dbkr/indexeddb_hide_internals' into dbkr/indexeddb_refactor_2 2017-04-03 16:41:02 +01:00
David Baker
753f11e0e9 Stray jsdoc line that didn't get removed 2017-04-03 15:39:08 +01:00
David Baker
c0bd2c8945 Further reorganising of indexeddb sync code
* Make sync communicate with the sync accumulator via the store
 * Consequently get rid of getSyncAccumulator as it's now
   unnecessary.
 * Make the bit that gets the saved sync response async, because
   we'll need it to be when it's coming over postMessage from a
   webworker.
2017-03-31 18:18:53 +01:00
David Baker
aebbe4f254 Change interface of IndexedDBStore: hide internals
Hide the IndexedDBBackend and SyncAccumulator objects and have
indexeddbstore instaniate them itself, rather than making the app
instantiate them. Pass the approipriate options through. This
gives us much more flexibility to move things around under the
hood.
2017-03-31 14:53:13 +01:00
David Baker
a38917f920 Don't be SYNCING until updating from the server
Syncing should probably mean the stream is up to date and
streaming messages in real-time from the server, which is not the
case if we've only loaded the cached response. Stay PREPARED until
we actually get the latest from the server.
2017-03-28 14:57:11 +01:00
Kegan Dougal
dec734346b Don't log the entire /sync response
The console will maintain a strong ref to this object, which may exacerbate
memory leaks.
2017-03-24 14:15:35 +00:00
Robert Swain
59a7232016 webrtc/call: Wrap long line 2017-03-24 15:00:49 +01:00
Robert Swain
d9e6aed9da webrtc/call: Assign MediaStream to video element srcObject
video.src = URL.createObjectURL(stream) is on the way out. Firefox will
complain with errors about not being able to play media of type
"text/html" for example.
2017-03-24 14:53:43 +01:00
David Baker
2c1e3416e3 Fix undefined reference in http-api
Put the check for 'onprogress' within the check to see if req is
defined, because sometimes it isn't, apparently.
2017-03-23 15:38:15 +00:00
Richard van der Hoff
62090ef119 Merge pull request #382 from fred-wang/master
Add copyright header to event-timeline.js
2017-03-22 17:31:34 +00:00
Richard van der Hoff
52ef8a635f Merge pull request #397 from williamboman/docs/user-global-account-data-event
client: fix docs for user-scoped account_data events
2017-03-22 17:10:52 +00:00
William Boman
bf26ccd0a5 client: fix docs for user-scoped account_data events
Signed-off-by: William Boman <william@redwill.se>
2017-03-22 18:02:24 +01:00
Kegsay
1ed105cb79 Merge pull request #395 from matrix-org/kegan/memleaks
Fix leaking room state objects on limited sync responses
2017-03-22 16:38:42 +00:00
Kegan Dougal
14727d75ac Review comments 2017-03-22 15:13:21 +00:00
Kegan Dougal
ccbc0b79b8 Add getter/setter for the callback on the MatrixClient instance rather than a startClient opt for ease of gluing code in 2017-03-22 14:29:59 +00:00
Kegan Dougal
86fd42dcb5 linting 2017-03-22 12:01:58 +00:00
Kegan Dougal
1e05e0d6f8 Review comments 2017-03-22 11:56:10 +00:00
David Baker
821e0ed6ce Merge pull request #396 from matrix-org/dbkr/ui_auth_bg_requests
Extend 'ignoreFailure' to be 'background'
2017-03-22 11:56:07 +00:00
David Baker
66ce31f6d6 Add docs. 2017-03-21 18:40:00 +00:00
David Baker
cf486aedbd Extend 'ignoreFailure' to be 'background'
This allows us to also use it to decide whether or not to show
the app as busy in the UI. We pass this flag up into the
makeRequest callback so it can use it as such.
2017-03-21 18:37:08 +00:00
David Baker
1b0f22c4ae Merge pull request #388 from matrix-org/dbkr/x_show_msisdn
Add x_show_msisdn parameter to register calls
2017-03-21 13:41:34 +00:00
Kegan Dougal
b666ec1f4d Fix memory leak on limited room responses 2017-03-20 11:46:50 +00:00
Kegan Dougal
999fc07683 Explain the memory hack 2017-03-20 11:34:50 +00:00
Kegan Dougal
37a186696a Remove spurious changes 2017-03-20 11:27:59 +00:00
Kegan Dougal
107ef27f69 Remove spurious changes 2017-03-20 11:26:59 +00:00
Kegan Dougal
0c1c10a0e0 WIP memleak fixes (341->295MB) 2017-03-16 18:02:17 +00:00
Luke Barnard
602e91da40 Update event redaction to keep sender and origin_server_ts
Required for fixing https://github.com/matrix-org/matrix-js-sdk/issues/387
2017-03-16 16:29:55 +00:00
Kegan Dougal
c30670000d Handle 'limited' timeline responses in the SyncAccumulator
Fixes vector-im/riot-web#3375
2017-03-16 13:20:27 +00:00
David Baker
9d8e81d79c Merge pull request #391 from matrix-org/dbkr/msisdn_better_error_message
Give a better error message if the HS doesn't support msisdn registeration
2017-03-16 12:44:58 +00:00
David Baker
421a35c201 Stray brace 2017-03-16 12:33:24 +00:00
David Baker
fcfc7b6cec Better doc & throw consistently 2017-03-16 12:02:06 +00:00
Luke Barnard
2f5da3851b Use XHR onprogress to debounce http._request timeout (#392)
Instead of just using a timeout to reject ongoing requests, reset the timeout when progress is observed (at least when requests are done from browsers).

This is to fix https://github.com/vector-im/riot-web/issues/2737
2017-03-16 09:50:24 +00:00
David Baker
6c2e8eba1c Do no-auth-flow error handling more properly 2017-03-15 16:42:57 +00:00
David Baker
c9c3937f4b Move exception throw into _chooseFlow 2017-03-15 14:33:31 +00:00
David Baker
7777cbf6da Lint 2017-03-15 14:21:34 +00:00
David Baker
a8a7d327ff Give a better error message
if the HS doesn't support msisdn registeration
2017-03-15 14:14:04 +00:00
David Baker
571fcbe98d Merge remote-tracking branch 'origin/develop' into dbkr/x_show_msisdn 2017-03-15 11:28:24 +00:00
David Baker
8b4b0e0d39 Save the completed flows (#389)
Otherwise we get very confused and go back to the start when given
a response with no flows etc.

Only copy data if none of the 3 fields are defined, since that's
more the situation we actually want to handle.
2017-03-15 11:15:35 +00:00
David Baker
c8868a393b Add x_show_msisdn parameter to rregister calls
Request the msisdn stages in the rtegister UI auth, as commented
2017-03-13 17:51:59 +00:00
Matthew Hodgson
49be37dcf9 remove incredibly verbose start/complete sync logging 2017-03-11 15:06:29 +00:00
David Baker
2cd5fe2fec Support msisdn registration and signin (#384)
* Functionality for msisdn signin

 * Add methods to request tokens from synapse to do msisdn
   verification
 * Extend interactive-auth to work with m.email.identity (which
   is significant since email auth is quite a chunk more complex).

* Oops, fix merge

* Fix lint

* Add submitMsisdnToken

* Support the bind_msisdn param to register

Change the bind_email flag to an object with keys 'email' and
'msisdn', backwards compatibly.
2017-03-09 10:56:50 +00:00
David Baker
8f790d406f Fix lint (add jsdoc) 2017-03-06 09:27:29 +00:00
David Baker
7e2a256229 Add getEmailSid
Other places sometimes need to re-use the email sid to send proof
of ownership of a email address to somewhere else.
2017-03-03 17:40:26 +00:00
David Baker
c7a0a560d8 Merge pull request #380 from matrix-org/dbkr/register_ui_auth
Add m.login.email.identity support to UI auth
2017-03-03 13:37:35 +00:00