Commit Graph

81 Commits (d264687796710a850bd106070e8af56bb563d16d)

Author SHA1 Message Date
Bruno Windels ef204b6e99 check if phased rollout has expired before trying to enable LL 2018-10-15 16:41:24 +02:00
David Baker 18661e042d Fall back to another store if indexeddb start fails
If we can't start indexeddb, fall back to a different store.

Previously we just ignored the exception and ploughed on anyway, on
the assumption that startup() was just for the indexeddb store to
load data anyway, and if that failed it would just do an initial
/sync instead (and also we'd keep trying to save the sync back which
would fail...). Then, in the previous release we started pulling
the settings out of the store on startup, making the assumpton that
the store actually worked, so the read obviously failed and the app
failed to start up.

This makes Riot work in Tor browser / firefox in daft mode again.
2018-10-04 13:40:56 +01:00
David Baker e1f68551f1 Fix error logging 2018-10-02 19:23:43 +01:00
Bruno Windels 42fc83d2a8 Move LL filter creation inside MatrixClient
As we need an option to turn lazy loading on (we can't just accept a filter,
as /messages has an incompatible filter), better only pass the option
and create the filter inside startClient
2018-08-02 19:38:41 +02:00
Bruno Windels 4b96e01410 enable newly introduced option 2018-08-02 13:01:57 +02:00
Bruno Windels af07d73432 hide lazy loading behind feature flag 2018-07-25 16:10:49 +02:00
Luke Barnard a11e1cc2f9 [WIP] Send lazy_load_memberers filter when syncing 2018-07-25 16:10:49 +02:00
Travis Ralston fe2cbc584d Merge branch 'develop' into travis/remove-presence 2018-04-11 15:17:28 -06:00
Luke Barnard d91d1932f4 Add tests for RoomSettings
For setting:
 - name
 - topic
 - history visibility
 - power levels

Testing RoomSettings required more stubbing on the matrix client.

The power level tests should be failing at this commit, with
fixes being made in upcoming commits.

Some tests are marked as known failures that we should fix but
aren't necessarily bugs:
 - SettingStore.setValue is used when saving despite the user not
   having made a change.
 - Testing directory publicity changes cannot be tested because we
   update state asynchronously in componentWillMount (which we do
   not block on in beforeEach).

Also, we needed to use `export default` to make sure everything
uses the same client peg and client.
2018-02-28 16:07:21 +00:00
Travis Ralston cc5eb77658 Remove presence management
The feature is incredibly buggy and doesn't work as expected due to server behaviour and client interaction. One of the major problems is the constantly confused presence state - this is caused by the mobile apps conflicting on the state of the web app, causing it to consider the user offline or online (and rarely away) depending on how riot-android/ios is behaving at the time.

This reverts two PRs:
* https://github.com/matrix-org/matrix-react-sdk/pull/1620
* https://github.com/matrix-org/matrix-react-sdk/pull/1482

The changes to the context menu positioning were not reverted as they are useful outside of presence management.

Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-12-25 14:25:13 -07:00
lukebarnard d5534a9ece Copyright 2017-12-13 10:17:38 +00:00
Luke Barnard 12515441cd Handle accountData events from TagOrderStore
This introduces a generic way to register certain events emitted by
the js-sdk as those that should be propagated through as dispatched
actions.

This allows the store to treat the js-sdk as the "Server" in the
Flux data flow model. It also allows for stores to not be aware
specifically of the matrix client if they are only reading from it.
2017-12-08 10:05:18 +00:00
David Baker 1675737e7d Merge remote-tracking branch 'origin/master' into develop 2017-11-17 17:48:42 +00:00
David Baker 6d23182f5f Fix the force TURN option
The call object is created within the js-sdk for inbound calls, so
we never got the chance to set it.
2017-11-17 14:54:44 +00:00
Luke Barnard dad797d4a2 Run linting --fix 2017-11-16 13:19:36 +00:00
Travis Ralston 6cd07731c4 Add MemberPresenceAvatar and control presence ourselves
Includes rudimentary support for custom statuses and user-controlled status. Some minor tweaks have also been made to better control how we advertise our presence.

Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-10-14 14:37:47 -06:00
Luke Barnard d3f9a3aeb5 Run eslint --fix
Fixing 1000s of lint issues. Some rules cannot be `--fix`ed but this goes some way to linting the entire codebase.
2017-10-11 17:56:17 +01:00
Richard van der Hoff 4998d1b359 Prepare for asynchronous e2e APIs
the js-sdk is making some of its APIs asynchronous, and adding an `initCrypto`
method which you have to call.

Particular methods we need to worry about are:

* `getStoredDevice`
* `getStoredDevicesForUser`
* `getEventSenderDeviceInfo`
* `isEventSenderVerified`
2017-07-18 23:47:36 +01:00
Richard van der Hoff a20ed2f632 Add some logging to track down flaky test
We had a test failure where apparently the MatrixClient failed to start
... let's try and figure out why.
2017-07-05 16:20:21 +01:00
David Baker 5d159c995d Merge branch 'master' into develop 2017-06-22 11:58:05 +01:00
Richard van der Hoff e9ab667d29 Use the web worker when clearing js-sdk stores
It turns out that Firefox doesn't let you use indexeddb from private tabs,
*unless* you are *also* in a webworker. We need to either consistently use it
or not use it - so let's use it.
2017-06-21 17:43:34 +01:00
David Baker a62f6d1094 Make the indexeddb worker script work again
Removed in 939f6d0798
2017-06-21 15:07:25 +01:00
David Baker e193fa5be5 Make the indexeddb worker script work again
Removed in 939f6d0798
2017-06-21 14:04:43 +01:00
Richard van der Hoff cd73139af5 Various logging cleanups
* don't just log errors without any context as to where they came from or what
   they mean
 * avoid the use of '%s' and multi-argument console.log because it looks awful
   under karma.
2017-06-20 17:38:02 +01:00
Richard van der Hoff 939f6d0798 Factor createMatrixClient out from MatrixClientPeg
... so that it can be used elsewhere.
2017-06-13 12:46:49 +01:00
Michael Telatynski 464863acd6 remove unused imports
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-06-02 21:35:55 +01:00
David Baker b78f654476 Add support for using indexeddb in a webworker 2017-04-06 11:13:39 +01:00
David Baker 9c4614e7ff Update for new IndexedDBStore interface 2017-03-31 14:55:33 +01:00
Kegan Dougal 658c34abf3 Change the name of the database
Full name is now `matrix-js-sdk:riot-web-sync`.
2017-02-21 15:44:57 +00:00
Kegan Dougal cca266c62c Review comments 2017-02-17 10:43:55 +00:00
Kegan Dougal c46f282139 Comments 2017-02-10 16:19:39 +00:00
Kegan Dougal 407bcf1bb9 Delete database on logout. DI a SyncAccumulator. Log uncaught errors 2017-02-10 14:22:54 +00:00
Kegan Dougal 300cd962e5 Add glue code to make react-sdk use indexedDB 2017-02-02 14:27:27 +00:00
David Baker 4942f4f35c Typo 2016-09-28 10:17:47 +01:00
David Baker c7ad9bfdad Add 'getHomeServerName' util to client peg 2016-09-27 19:38:10 +01:00
Matthew Hodgson 4aef352a5c update to use new API based on js-sdk PR input 2016-09-08 22:48:44 +01:00
Matthew Hodgson 27b3f5f6b1 create a global notif timeline set for each client 2016-09-08 03:02:26 +01:00
Richard van der Hoff df22768f1b Use server-generated deviceId 2016-08-12 07:31:15 +01:00
Richard van der Hoff e32c325863 Don't use MatrixClientPeg for temporary clients
Get rid of MatrixClientPeg.replaceUsingUrls, and instead create local,
temporary MatrixClients for the unauthed steps; we therefore only use
MatrixClientPeg for logged-in clients.
2016-08-11 16:23:03 +01:00
David Baker 92762eca74 Fix settings resetting on refresh
Don't clear localstorage when replacing the client: we clear it when logging out so this is just redundant, and since we now use replaceClient to unpickle a session from localstorage, this was blowing away all our setting on every refresh.

Also Move all of the localstorage code to Lifecycle (except device ID but this will probably be generated on the server soon anyway). We previously cleared localstorage on logout in Lifecycle so persist the session in Lifecycle.setLoggedIn() to be symmetrical.
2016-08-10 18:04:22 +01:00
Richard van der Hoff 3922f6a1b7 Move rehydration of MatrixClients from MatrixClientPeg to SessionLoader
This means that we don't create a spurious MatrixClient which is thrown away by
the SessionLoader (whilst still ensuring that the rehydrated matrixclient
follows the same code path as matrixclients created at other points in the
session load process).
2016-08-10 11:59:24 +01:00
David Baker b32a19a0f1 Comments 2016-08-03 17:23:09 +01:00
David Baker 0919e41469 Fix MatrixClientPeg.start()
Move import & use `this`
2016-08-03 16:45:23 +01:00
David Baker 009c768b72 Comma fail 2016-08-03 16:41:22 +01:00
David Baker 9bf45fb556 Add start wrapper in MatrixClientPeg
to handle the opts dictionary
2016-08-03 16:39:47 +01:00
David Baker d9a7d50a03 Add an interface for MatrixClientCreds
and make MatrixClientPeg functions use it consistently
2016-08-03 10:46:42 +01:00
David Baker 4825ab8fe7 No need to set options in WillStartClient
We can set them any time up to that point
2016-08-03 09:53:02 +01:00
David Baker 40834d188e Don't let pendingEventOrdering be changed 2016-08-02 18:58:18 +01:00
David Baker db9750a7e3 Call the logout API when we log out
Also try to refactor some of the login/logout code out of MatrixChat and into a separate Lifecycle.js. This still isn't great, but it at least gets some code out of MatrixClient.
2016-08-02 14:04:20 +01:00
David Baker cbf10bfff6 PR feedback
Reintroduce replaceClient so we're not calling replaceUsingAccessToken without access tokens which is a bit silly.
Fix bug from previous commit (pass isGuest through)
2016-07-25 16:28:28 +01:00