Commit Graph

74 Commits (45c0c0eddd0744bb337a18a0d50179802b26658a)

Author SHA1 Message Date
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
David Baker 587a86441f This may as wel go in createclient 2016-07-25 16:20:03 +01:00
David Baker ddbac8c73a More refactoring of MatrixClientPeg
Including getting rid of GuestAccess as it was basically doing nothing apart from remembering if we were a guest which may as well be done in the same place we save/restore everything else
2016-07-22 15:47:47 +01:00
David Baker b7e95b3883 Remove other guestAccess arg 2016-07-22 14:00:23 +01:00
David Baker ea5e021d8d Refactor MatrixClientPeg
Should be functionally identical
2016-07-21 17:57:55 +01:00
David Baker 46a2c74d71 Merge pull request #358 from matrix-org/rav/device_id_for_register
Set the device_id on pre-login MatrixClient
2016-07-21 13:15:39 +01:00
Richard van der Hoff e41df245c3 Set the device_id on pre-login MatrixClient
In order that device_id is set when we register a new user (or, for that
matter, when we register as a guest), we need to make sure that device_id is
set on the temporary MatrixClient which is created before the user is logged
in - ie, that created by replaceUsingUrls.

In order to achieve this, I've basically removed the distinction between
replaceUsingAccessToken and replaceUsingUrls. There is a side-effect in that
the temporary MatrixClient now gets an e2e sessionStore, but I don't think that
is a bad thing.
2016-07-20 20:20:10 +01:00
Aviral Dasgupta 769b3f0c2a Merge branch 'develop' into feature-autocomplete 2016-06-17 00:37:39 +05:30