Commit Graph

51 Commits (b50046f1ab7ce64cf3387ccb1b3c39fc883894c6)

Author SHA1 Message Date
Travis Ralston 90a898d03f Move dispatcher into a subdirectory
We're expecting to have a whole bunch of types for the dispatched payloads, so pull the thing into a directory we can throw them in.
2020-05-13 21:07:50 -06:00
Half-Shot 93f2a83774 Revert "Assume room should be unencrypted if homeserver does not implement keys/query"
This reverts commit baa7a86e3e.
2020-05-08 16:36:13 +01:00
Will Hunt baa7a86e3e
Assume room should be unencrypted if homeserver does not implement keys/query
Dendrite (and others) do not support key fetching (or indeed, E2E at all). Rather than failing to create a room at all, leave it unencrypted. Fixes #13598
2020-05-08 16:33:50 +01:00
Travis Ralston b4e2daaf46 Convert cross-signing feature flag to setting
This is intended as a temporary measure until we're comfortable with removing the flag entirely.
2020-04-15 13:18:42 -06:00
Bruno Windels e3e40ace81 Fix: pick last active DM for verification request 2020-03-26 17:45:59 +01:00
Travis Ralston 46a6af0ad1 Ensure errors when creating a DM are raised to the user
Fixes https://github.com/vector-im/riot-web/issues/12186

Note: this will still result in an empty room being created, but that's a Synapse issue and not something we can solve.
2020-02-27 17:10:31 -07:00
Zoe 164b355ffe abstract out the check for available target devices 2020-02-18 11:25:19 +00:00
Zoe 28df1e28cf Start verification sessions in an E2E DM where possible
Fixes https://github.com/vector-im/riot-web/issues/12187
2020-02-17 15:08:22 +00:00
Bruno Windels 4b7cc12daa check if there is already a request in progress when clicking verify
and go straight there instead of first showing EncryptionInfo panel
2020-02-13 14:34:44 +01:00
J. Ryan Stinnett 2b16b650fe Add encryption option to createRoom 2020-01-23 14:05:38 +00:00
J. Ryan Stinnett c25c1878b8 Move control of room initial state into createRoom
This changes `createRoom` so it has more control of the room's initial state,
and appends state for different features, rather resetting the entire state
array. This makes room for also controlling encryption state in the next change.
2020-01-23 13:54:43 +00:00
Travis Ralston d1fcef1211 Merge branch 'develop' into bwindels/verification-right-panel 2020-01-16 13:23:32 -07:00
Travis Ralston 59f608ffd6
Merge pull request #3761 from matrix-org/travis/babel7-wp-es6-export
Convert CommonJS exports to ES6 exports
2020-01-08 09:09:11 -07:00
Bruno Windels b80bfd04b2 make sure to have roomId of DM when starting verif. req. 2020-01-03 13:47:38 +01:00
Travis Ralston 042bd35d79 Fix MatrixClientPeg imports 2019-12-22 21:15:54 -07:00
Travis Ralston d56f0f2a25 Convert many imports to handle ES6 exports
Reliant upon https://github.com/matrix-org/matrix-react-sdk/pull/3761
2019-12-22 21:04:42 -07:00
Travis Ralston 344dac4fb9 Convert CommonJS exports to ES6-compatible exports
We use `export default` begrudgingly here. Ideally we'd use just `export`, though this entire SDK expects things to be exported as a default. Instead of breaking everything, we'll sacrifice our export pattern for a smaller diff - a later commit can always do the default export -> regular export conversion.
2019-12-22 21:01:02 -07:00
Michael Telatynski d4d51dc61f Rip out the remainder of Bluebird 2019-11-18 10:03:05 +00:00
David Baker 4c036c98ee Fix double-spinner
On registering, we showed a spinner, and then another spinner on
top of the spinner, which led to an interesting spinner-in-box
effect.

Suppress the second type of spinner when we know we already have one.
2019-06-14 17:21:07 +01:00
Travis Ralston d755263e33 Handle M_UNSUPPORTED_ROOM_VERSION in invites and room creation
Fixes https://github.com/vector-im/riot-web/issues/8925
2019-04-09 19:03:38 -06:00
David Baker 27fa21e403 Replace view_set_mxid with require_registration
To put all the other flows through the to-ilag-or-not-to-ilag flow
2018-09-05 18:08:49 +01:00
Michael Telatynski 3060ec1053 Use invite_3pid prop of createRoom instead of manual invite after create
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-01-25 09:54:31 +00:00
David Baker 6b6e59e0dd Display spinner not room preview after room create
After creating a room, display the activity spinner while we wait
for the room to come down the event stream.

This was the intention before but I can't see how it would have
worked: we were setting the 'joining' flag, but then resetting it
by claiming we were already joined in the view_room dispatch.

 * Send 'joining' instead of 'joined' in view_room dispatch, which
   will set the corresponding joining flag (ie. to indicate we've
   sent a request to join the room). Remove the 'joined' flag.
 * Reset 'joining' to false otherwise on a view_room dispatch to
   prevent it from leaking between rooms (this may have been the
   intention of the `if (payload.joined) newState.joining = false`?

Fixes https://github.com/vector-im/riot-web/issues/4701
2017-09-14 22:22:21 +01:00
Michael Telatynski 56ea528f43
don't track error messages .2
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-08-10 15:17:52 +01:00
Michael Telatynski bf98c0da7c
un-i18n Modal Analytics
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-07-27 17:19:18 +01:00
Richard van der Hoff 0254d2b3a2 q(...) -> Promise.resolve
```
find src test -name '*.js' | xargs perl -i -pe 's/\b[qQ]\(/Promise.resolve(/'
```
2017-07-12 18:05:08 +01:00
Richard van der Hoff a06bd84213 replace imports of `q` with bluebird
update `package.json`

```
find src test -name '*.js' |
   xargs perl -i -pe 'if (/require\(.[qQ].\)/) { $_ = "import Promise from '\''bluebird'\'';\n"; }'

find src test -name '*.js' |
   xargs perl -i -pe 'if (/import [qQ]/) { $_ = "import Promise from '\''bluebird'\'';\n"; }'
```
2017-07-12 18:05:08 +01:00
Luke Barnard a921059432 Fix vector-im/riot-web#4526 by pretending to join
I thought about adding separate dispatches to prevent confusion but if anyone adds anything that listens to existing dispatches, they really ought to be grep-ing the world for said dispatch actions.
2017-07-06 17:40:27 +01:00
Luke Barnard b3db6344ae Fix import for Rooms so that DMs can be created 2017-07-05 15:00:50 +01:00
Michael Telatynski b937957609
de-lint createRoom
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-07-01 14:40:46 +01:00
David Baker 640b7a74a2 Remove unnecessary if 2017-06-19 16:45:40 +01:00
David Baker 02da6fdbd5 Fix infinite spinner on email registration
Remove setTimeout on dialog display as it's no longer necessary
and causes races.
2017-06-19 16:40:33 +01:00
Luke Barnard be58e1095e Don't peek when creating a room
This causes a race between receiving the room when starting to peek and receiving the room from joining it - https://github.com/vector-im/riot-web/issues/4330, https://github.com/matrix-org/riot-web-rageshakes/issues/196
2017-06-16 18:24:07 +01:00
Luke Barnard 619830617a Merge branch 'develop' into luke/ilag-i18n
In order to get ILAG internationalised

Conflicts:
	src/components/structures/LoggedInView.js
	src/components/structures/MatrixChat.js
	src/components/views/dialogs/ChatCreateOrReuseDialog.js
	src/components/views/dialogs/SetDisplayNameDialog.js
	src/createRoom.js
	src/i18n/strings/en_EN.json
2017-06-05 16:08:03 +01:00
Kegan Dougal f75e714c3a More translations.. 2017-06-01 15:18:06 +01:00
Matthew Hodgson 5c885922d9 Merge branch 'develop' into new-guest-access 2017-05-28 22:58:18 +01:00
David Baker 443ab1add7 Put back default strings on dialogs
But make them work by calling _t in render rather than
getDefaultProps().

Also sort out some 'Warning!' strings
2017-05-25 18:20:48 +01:00
David Baker 5c359e63ab Bulk change counterpart imports
to use languageHandler wrapper func
2017-05-25 11:39:08 +01:00
Luke Barnard 298c5e4df3 Implement a store for RoomView
This allows for a truely flux-y way of storing the currently viewed room, making some callbacks (like onRoomIdResolved) redundant and making sure that the currently viewed room (ID) is only stored in one place as opposed to the previous many places.

This was required for the `join_room` action which can be dispatched to join the currently viewed room.

Another change was to introduce `LifeCycleStore` which is a start at encorporating state related to the lifecycle of the app into a flux store. Currently it only contains an action which will be dispatched when the sync state has become PREPARED. This was necessary to do a deferred dispatch of `join_room` following the registration of a PWLU (PassWord-Less User).

The following actions are introduced:
 - RoomViewStore:
    - `view_room`: dispatch to change the currently viewed room ID
    - `join_room`: dispatch to join the currently viewed room
 - LifecycleStore:
    - `do_after_sync_prepared`: dispatch to store an action which will be dispatched when `sync_state` is dispatched with `state = 'PREPARED'`
 - MatrixChat:
    - `sync_state`: dispatched when the sync state changes. Ideally there'd be a SyncStateStore that emitted an `update` upon receiving this, but for now the `LifecycleStore` will listen for `sync_state` directly.
2017-05-24 16:56:13 +01:00
David Baker d419c42a4f Squash merge https://github.com/matrix-org/matrix-react-sdk/pull/801 2017-05-23 15:16:31 +01:00
Luke Barnard ca907f42dc Fix redundant getComponent 2017-05-16 14:24:24 +01:00
Luke Barnard f199f3599e Replace NeedToRegisterDialog /w SetMxIdDialog
This uses MatrixChat's `view_set_mxid`
2017-05-15 17:31:26 +01:00
Matthew Hodgson 3aaf37df1a beautify a tonne more errors 2017-03-12 22:59:41 +00:00
David Baker 18d4d3392a Fix a bunch of linting errors
eslint --fix and a few manual ones
2017-01-20 14:22:27 +00:00
Matthew Hodgson c51e6907f0 fix spinner on createroom 2016-09-17 02:19:32 +01:00
David Baker 2943db1072 Flag incoming DMs as such
* Add the 'is_direct' flag to rooms created for DMs
 * For invites, look for the DM flag when getting the DM user ID for a room
 * When accepting an invite, look for the flag and mark the room as a DM room if appropriate.
2016-09-12 18:32:44 +01:00
David Baker 96fabe09d2 Update createRoom to support creating DM rooms
* Make ChatInviteDialog and MemberInfo createRoom use it
* Fix bug in setDMRoom
2016-09-09 19:25:00 +01:00
Matthew Hodgson 1ba0ef7369 Merge pull request #350 from matrix-org/wmwragg/spinner-fix
Wmwragg/spinner fix
2016-07-19 12:10:31 +01:00
wmwragg 1559c69ddf Create room Dialog Spinner fix. 2016-07-17 21:21:27 +01:00
Matthew Hodgson 2bc9dd4307 hopefully fix vector-im/vector-web#1813 2016-07-17 18:32:48 +01:00