Commit graph

210 commits

Author SHA1 Message Date
Michael Telatynski
8bd45ce893 add /rainbow and /rainbowme Slash Commands
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-05-12 16:36:43 +01:00
Travis Ralston
6b45e60314 Update ServerTypeSelector for registration to use a server config 2019-05-03 11:32:59 -06:00
Travis Ralston
636cb8a5cc Have ServerConfig and co. do validation of the config in-house
This also causes the components to produce a ValidatedServerConfig for use by other components.
2019-05-03 11:32:59 -06:00
J. Ryan Stinnett
44e9ca6c52 Extract isContentActionable to a separate helper
This moves the check about whether an event is actionable (for the purpose of
replies, edits, reactions, etc.) to shared utils module.
2019-05-02 12:05:17 +01:00
Hubert Chathi
443a15eeb9 actually clear bit 63 instead of bit 55 2019-04-25 11:04:48 -04:00
J. Ryan Stinnett
4f41161a47 Check password complexity during registration
This adds a password complexity rule during registration to require strong
passwords. This is based on the `zxcvbn` module that we already use for key
backup passphrases.

In addition, this also tweaks validation more generally to allow rules to be
async functions.
2019-04-25 14:29:10 +01:00
Bruno Windels
eeaa7143ac move name coloring out of sender profile
so we can reuse it in room preview bar
2019-04-17 10:21:30 +02: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
J. Ryan Stinnett
16573a6381 Track store failures after startup
This watches the `IndexedDBStore` in case it degrades. If it does, we track this
in analytics so we can observe how often it happens in the field.

Should help track errors like https://github.com/vector-im/riot-web/issues/7769
2019-04-04 11:59:53 +01:00
J. Ryan Stinnett
57d72b4deb
Merge pull request #2841 from jryans/storage-eviction-modal
Notify user when crypto data is missing
2019-04-01 17:31:39 +01:00
J. Ryan Stinnett
328f0cd6bf Notify user when crypto data is missing
If we have account data in local storage but nothing in the crypto store, it
generally means the browser has evicted IndexedDB out from under us. This adds a
modal to explain the situation and offer to completely clear storage to get
things back to normal.

Fixes https://github.com/vector-im/riot-web/issues/9109
2019-03-29 16:06:08 +00:00
Bruno Windels
a326c83016
Merge pull request #2842 from matrix-org/bwindels/bacat-scrolling-merged-develop
BACAT Scrolling
2019-03-29 14:02:15 +00:00
Bruno Windels
0a4ef44bcf fix lint 2019-03-28 18:29:48 +01:00
J. Ryan Stinnett
f396cf830c Clarify when memory stores are being used
This adds logging for the cases where memory only stores are being used. It also
reorganises the sync store path to match the crypto store.

Part of https://github.com/vector-im/riot-web/issues/9309
2019-03-28 12:40:38 +00:00
J. Ryan Stinnett
1928c43476 Check the local storage fallback for crypto store
This adds additional consistency checks to examine the local storage fallback
for the crypto store as well as the primary IndexedDB variant.

Part of https://github.com/vector-im/riot-web/issues/9309
2019-03-28 12:27:33 +00:00
J. Ryan Stinnett
73b2484e08 Catch errors when checking IndexedDB
In Firefox private browsing, we may get errors when checking storage
consistency. We don't want that to block general Riot operation, so catch those
errors and log instead.

Fixes https://github.com/vector-im/riot-web/issues/9300
2019-03-27 15:48:38 +00:00
Bruno Windels
adf263c4af Merge branch 'develop' into bwindels/bacat-scrolling-merged-develop 2019-03-27 11:46:28 +01:00
David Baker
a1e5fecb67
Merge pull request #2832 from jryans/storage-telemetry
Send telemetry about storage consistency
2019-03-27 09:58:55 +00:00
Travis Ralston
ddcb7a68bd
Merge pull request #2781 from matrix-org/travis/openid-widget
Widget OpenID reauth implementation
2019-03-27 03:42:39 -06:00
J. Ryan Stinnett
d06fb0d076 Send telemetry about storage consistency
This adds telemetry events about basic storage consistency, so we can start to
get an idea of how often IndexedDB eviction occurs in the field.

Fixes https://github.com/vector-im/riot-web/issues/9272
2019-03-27 09:26:15 +00:00
J. Ryan Stinnett
4c0f459995 Add basic storage consistency check
This adds a storage consistency check just before creating a client on login.
Each data store we use is checked for data and any problems are logged to the
console.

Fixes https://github.com/vector-im/riot-web/issues/9271
2019-03-26 16:34:13 +00:00
J. Ryan Stinnett
90dbeefcfb Remove unused option for disabling IndexedDB
`createMatrixClient` and surrounding paths support an argument to disable
IndexedDB, but it is never actually used. This removes the option to simplify
the code.
2019-03-26 13:29:04 +00:00
Travis Ralston
2dcb40f1be Track OpenID automatic permissions by (widgetLocation, widgetUrl) 2019-03-23 23:25:31 -06:00
J. Ryan Stinnett
2ac7dd4ca3 Explicitly create cryptoStore in React SDK
The React SDK has a client creation path that starts 2 out of 3 stores, but then
leaves the other one for the JS SDK's default value handling.

We'll soon be adding additional code to check the health of stores, so it would
be simpler to follow and think about if we create them all in one place.
2019-03-22 15:03:03 +00:00
Bruno Windels
bab2730d40 use ResizeNotifier as well to relayout room list 2019-03-15 10:16:21 +01:00
Bruno Windels
891e343df6 create ResizeNotifier to derive which areas of the app resize and emit 2019-03-15 10:16:21 +01:00
David Baker
1e7af106b0 Merge branch 'master' into develop 2019-03-06 11:28:54 +00:00
David Baker
610a6d935a Only show hosting link if domain == matrix.org
Fixes https://github.com/vector-im/riot-web/issues/9059
2019-03-06 10:22:19 +00:00
David Baker
7aa451067e Add utm_campaign to the hosting links
According to where in the app the link was clicked
2019-03-05 18:33:22 +00:00
David Baker
0244990731 Add utm_campaign to the hosting links
According to where in the app the link was clicked
2019-03-05 16:42:22 +00:00
Travis Ralston
4c4b2eedaf Check if users are already in the room before inviting them
Fixes https://github.com/vector-im/riot-web/issues/8965

This also addresses another issue where inviting a banned user shows up as "Unknown server error".
2019-03-01 13:36:24 -07:00
David Baker
e5e355ed2d Remove the white screen of welcome
If there's no home page configured, view the first room.
2019-02-14 12:35:09 +00:00
J. Ryan Stinnett
319369d1be Fix remaining warnings for enabled files 2019-01-23 18:38:49 -06:00
Travis Ralston
7f6ce69c3e Merge branch 'experimental' into travis/develop2 2019-01-17 16:03:45 -07:00
Bruno Windels
a7d21ebb8e re-apply Timer linting fixes that happened in the tiled ui PR 2019-01-17 10:44:12 +01:00
Bruno Windels
8c30d05eb8 Revert "Merge pull request #2348 from matrix-org/bwindels/roomgridview-experimental"
This reverts commit ece5cb1fcc, reversing
changes made to 64a3d2521c.
2019-01-17 10:29:37 +01:00
David Baker
55889d5491 Change wording of 'invite anyway' setting
https://github.com/vector-im/riot-web/issues/7922
2019-01-16 15:07:30 +00:00
Travis Ralston
177d9f245a
Merge pull request #2441 from matrix-org/develop
Merge develop -> experimental
2019-01-14 14:45:20 -07:00
Travis Ralston
a05c0f9214 Rephrase everything to be "invite anyways" rather than "retry"
Also handle profile errors better
2019-01-11 15:46:03 -07:00
Travis Ralston
5333114d7b Give a route for retrying invites for users which may not exist
Fixes https://github.com/vector-im/riot-web/issues/7922

This supports the current style of errors (M_NOT_FOUND) as well as the errors presented by MSC1797: https://github.com/matrix-org/matrix-doc/pull/1797
2019-01-10 21:43:21 -07:00
Bruno Windels
c6952ba5b6 fix some more lint warnings, as limit is 16 now 2019-01-07 16:56:35 +01:00
Bruno Windels
aedc220b62 fix (some) lint warnings 2019-01-07 16:33:23 +01:00
Travis Ralston
8017f0a4a1 Merge remote-tracking branch 'origin/experimental' into travis/develop-for-real 2019-01-03 16:00:23 -07:00
David Baker
f928be6f59 Revert "Merge pull request #2395 from matrix-org/dbkr/merge_develop_experimental"
This reverts commit ad47144355.
2019-01-03 15:37:03 -07:00
David Baker
7d161de35b Partial merge of develop to experimental
Does not include #2336 as the file has been moved out from underneath it:
will do this separately
2019-01-03 15:02:58 +00:00
J. Ryan Stinnett
a597ad10b0 Add a few more zxcvbn strings
Signed-off-by: J. Ryan Stinnett <jryans@gmail.com>
2018-12-19 17:46:37 +00:00
Bruno Windels
8045009d81 remove logging 2018-12-11 16:26:23 +01:00
Bruno Windels
5cd5615b69 Timer class, promise based, so clear/setTimeout doesn't grow unwieldly 2018-12-11 15:43:41 +01:00
Travis Ralston
0f348a7c78 Merge branch 'develop' into travis/invite-errors 2018-12-05 11:25:45 -07:00
Travis Ralston
987ad0b0db Check if users exist before inviting them and communicate errors
Fixes https://github.com/vector-im/riot-web/issues/3283
Fixes https://github.com/vector-im/riot-web/issues/3968
Fixes https://github.com/vector-im/riot-web/issues/4308
Fixes https://github.com/vector-im/riot-web/issues/1597
Fixes https://github.com/vector-im/riot-web/issues/6790

This does 3 things:
* Makes the `MultiInviter` check for a user profile before attempting an invite. This is to prove the user exists.
* Use the `MultiInviter` everywhere to avoid duplicating the logic. Although a couple places only invite one user, it is still worthwhile.
* Communicate errors from the `MultiInviter` to the user in all cases. This is done through dialogs, where some existed previously but were not invoked.

Specifically to the 403 error not working: What was happening was the `MultiInviter` loop was setting the `fatal` flag, but that didn't resolve the promise it stored. This caused a promise to always be open, therefore never hitting a dialog.
2018-11-29 15:05:53 -07:00
David Baker
075c13a5bd Add password strength meter to backup creation UI
https://github.com/vector-im/riot-meta/issues/227
2018-11-23 15:50:23 +00:00
Bruno Windels
ba83166661 Merge branch 'develop' into experimental 2018-10-31 14:54:22 +01:00
Aaron Raimist
49ce4ef117
eslint --fix src/
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2018-10-26 22:50:38 -05:00
Bruno Windels
f2efbc15f4 apply color categories to sender profile name 2018-10-23 10:49:44 +02:00
Aaron Raimist
752d816780
Fix some more lint errors
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2018-10-11 22:06:01 -05: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
1ec0f04baf Remove old migration code
...as instructed!
2018-10-03 18:33:34 +01:00
David Baker
fa669bf096 Error on splash screen if sync is failing
Display an error on the splash screen with the spinner if the sync
request is not working, rather than just sitting there with a spinner
as if nothing is wrong.

Fixes https://github.com/vector-im/riot-web/issues/7148
2018-09-07 12:18:25 +01:00
Bruno Windels
3b29b7aab6 fix getDMRoomsForUserId not calling _getUserToRooms first (thanks e2e tests) 2018-09-04 17:36:50 +02:00
Bruno Windels
44a53cfc0d use lodash for unique function instead of rolling our own 2018-09-04 16:03:15 +02:00
Bruno Windels
e171296d51 patch self-chats lazily in favor of awaiting sync state 2018-09-04 16:00:40 +02:00
Bruno Windels
6c7cb380e0 add warning in console when patching rooms, so it appears in rage shakes 2018-09-04 13:12:26 +02:00
Bruno Windels
441036ff93 remove duplicates from room lists 2018-09-04 13:12:26 +02:00
Bruno Windels
245dfbf957 only put NON-guessed rooms in self-chats 2018-09-04 13:12:26 +02:00
Bruno Windels
c12abab52d wait until rooms are available
as accountData get processed before rooms, during initial sync
or loading sync from cache, accountData gets emitted
before any room is available, hence our patching wasn't doing
anything. Just as well, because it would have failed (see next commits)
2018-09-04 13:12:26 +02:00
Bruno Windels
fb0a0d5d9e allow self-chats 2018-08-30 12:36:53 +02:00
Bruno Windels
d8f15e1159 make sure we still have the room 2018-08-30 12:06:34 +02:00
Bruno Windels
85b6f157c1 only patch m.direct data on server once per session to avoid request storm 2018-08-30 12:01:13 +02:00
Bruno Windels
379ddfff29 dont reassign userToRooms as we're just patching it up, also better check if we really have self DMs 2018-08-30 11:50:57 +02:00
Bruno Windels
caff60d56d fix var decl 2018-08-30 11:37:13 +02:00
Bruno Windels
5afb3bfb29 patch up DMs marked to self (can happy if any client has a bug here) 2018-08-30 10:53:25 +02:00
Bruno Windels
cead4096d8
Merge pull request #2118 from matrix-org/bwindels/feature_lazyloading
Lazy loading of room members
2018-08-16 18:14:55 +02:00
David Baker
8567ce585b Factor out duplication of resource limit i18n 2018-08-16 13:31:17 +01:00
Bruno Windels
c8b6ccba25 fallback to room summary for dm detection 2018-08-14 11:43:03 +02:00
Bruno Windels
908de56c6d replace getMember(myId).membership with getMyMembership
This works with rooms which haven't had their members
loaded yet.
2018-08-02 11:42:05 +02:00
Bruno Windels
d87d34030a fix dm detection and conf call code with lazy loading 2018-07-25 16:10:49 +02:00
Bruno Windels
e237a02fa5 use more consistent naming 2018-07-25 16:10:49 +02:00
Bruno Windels
54904c9282 use member helper method instead of digging inside member 2018-07-25 16:10:49 +02:00
David Baker
7aab6fa6f1 Merge remote-tracking branch 'origin/develop' into dbkr/widget_echo 2018-07-18 09:35:57 +01:00
David Baker
983dc3ad2e lint 2018-07-16 16:19:18 +01:00
David Baker
0f32c3a018 PR feedback 2018-07-16 13:18:10 +01:00
David Baker
e56feea9ec Put always-on-screen widgets in top left
always-on-screen widgets now appear in the top-left where the
call preview normally is if you're not in the room that they're in.

Fixes https://github.com/vector-im/riot-web/issues/7007
Based off https://github.com/matrix-org/matrix-react-sdk/pull/2053
2018-07-12 18:43:49 +01:00
David Baker
c26b300f30 more comments 2018-07-05 19:58:10 +01:00
David Baker
eb552e5cef Just pass the roomId into WidgetEchoStore 2018-07-05 18:43:20 +01:00
David Baker
c665ab8a22 Add error dialog if widget remove fails
Also up the timeout because matrix.org is that slow
2018-07-03 11:55:41 +01:00
David Baker
8b64ddcbe8 Do some level of local echo for widgets
* Show a spinner while we wait for widgets to be deleted
 * Hide widgets while they're pending deletion
 * Don't put another jitsi widget into the room if there's already
   one pending
2018-07-03 11:16:44 +01:00
David Baker
c780cd05a8 Change argument order of setRoomWidget
So when deleting a widget we can just omit the ones we don't need
2018-06-26 16:33:28 +01:00
David Baker
cb89406d3e Indent 2018-06-26 15:42:29 +01:00
David Baker
4a39297e65 PR feedback 2018-06-26 15:41:43 +01:00
David Baker
0a6450507e Bits of PR feedback 2018-06-26 15:21:22 +01:00
David Baker
ca8a4a0c3f Remove unused function 2018-06-26 12:08:33 +01:00
David Baker
6cf11a15e6 Move WidgetUtils to utils dir 2018-06-26 11:59:16 +01:00
David Baker
0f2c47937c Merge the two different widget utils files 2018-06-26 11:52:21 +01:00
Travis Ralston
210fcf0d52 Correctly identify sticker picker widgets
Widgets added to account data have the `type` of "m.widget", meaning we have to look at the `content.type` which will tell us what it is. 

This also fixes a bug where all user widgets become sticker picker widgets under the right conditions.

Signed-off-by: Travis Ralston <travpc@gmail.com>
2018-05-13 17:15:35 -06:00
Luke Barnard
6ec9e5f670
Merge pull request #1866 from matrix-org/luke/luke/group-store-refactor
Refactor GroupStores into one global GroupStore
2018-05-01 12:33:06 +01:00
Luke Barnard
023daef4b7 Refactor GroupStores into one global GroupStore
Take a step closer to a flux-like architecture for group data, for
the purposes of providing features that require it.

Now the app has a single GroupStore that can be poked to fetch
updates for a particular group.
2018-05-01 11:24:17 +01:00
Matthew Hodgson
bffd5bb891 fix constness 2018-04-29 03:09:17 +01:00
Matthew Hodgson
9701fd32b7 switch back to blob urls for rendering e2e attachments
Based on @walle303's work at https://github.com/matrix-org/matrix-react-sdk/pull/1820
Deliberately reverts 8f778f54fd
Mitigates XSS by whitelisting the mime-types of the attachments so that malicious ones
should not be recognised and executed by the browser.
2018-04-29 03:07:31 +01:00
Matthew Hodgson
70f3804227 move room directory logic over from riot-web 2018-04-11 23:58:46 +01:00
Richard Lewis
11915b0cdf Fix user widget event type.
Add comments for clarity.
2018-04-02 10:02:41 +01:00