1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-29 16:43:09 +03:00
Commit Graph

3479 Commits

Author SHA1 Message Date
Travis Ralston
b95079d1c5 Merge pull request #898 from matrix-org/travis/packages.matrix.org
Use packages.matrix.org for Olm
2019-04-16 09:14:21 -06:00
J. Ryan Stinnett
e59f36cdc0 Merge pull request #899 from matrix-org/travis/fix-tests
Fix tests on develop
2019-04-16 09:36:56 +01:00
Travis Ralston
0f2f041d8b Use constants for autodiscovery errors
To ease usage
2019-04-15 22:04:24 -06:00
Travis Ralston
33d2837ec3 Use packages.matrix.org for Olm
See https://github.com/vector-im/riot-web/issues/9497
2019-04-15 21:23:18 -06:00
Travis Ralston
fe47435fc7 Fix tests for autodiscovery 2019-04-15 21:12:17 -06:00
Travis Ralston
491226a916 Use the right this in _shouldAbortSync 2019-04-15 21:04:29 -06:00
Travis Ralston
deb7433453 Use toMatch for presence events
We don't pass the reference through, so the test fails with toEqual
2019-04-15 20:17:42 -06:00
Travis Ralston
14973a35c2 Use the right error object 2019-04-15 19:46:30 -06:00
Travis Ralston
b5779f8654 Merge pull request #895 from matrix-org/travis/stop-client-on-logout
Stop syncing when the token is invalid
2019-04-15 11:30:24 -06:00
Travis Ralston
f7d1984257 De-duplicate usage of shouldAbortSync 2019-04-15 11:29:55 -06:00
Bruno Windels
3fba683090 Merge pull request #887 from jkasun/fix_redact_put
change event redact,  POST request to PUT request
2019-04-15 15:13:59 +00:00
jkasun
430da8ac09 JS Doc Fix 2019-04-15 20:34:39 +05:30
Travis Ralston
dcd9b5c382 Stop syncing when the token is invalid
Fixes https://github.com/vector-im/riot-web/issues/9451
2019-04-14 21:38:51 -06:00
jkasun
348c293962 Argument Length Check, Duplicate Fix for Redact Funcation 2019-04-13 22:23:57 +05:30
Travis Ralston
34309da10c Merge pull request #894 from matrix-org/travis/guests/better-errors
Expose better autodiscovery error messages
2019-04-12 10:21:05 -06:00
Travis Ralston
6db973f430 Expose better autodiscovery error messages
Fixes https://github.com/vector-im/riot-web/issues/7925
2019-04-11 15:50:43 -06:00
J. Ryan Stinnett
9f27bafa62 Merge pull request #892 from jryans/degraded-storage
Explicitly guard store usage during sync startup
2019-04-09 17:12:07 +01:00
Travis Ralston
b05136146a Merge pull request #893 from matrix-org/travis/v3-safe
Flag v3 rooms as safe
2019-04-09 10:00:56 -06:00
Travis Ralston
13d3be637b Copyright 2019 NV 2019-04-09 09:58:33 -06:00
J. Ryan Stinnett
44de7fad6f Preserve previous error flow 2019-04-09 16:44:36 +01:00
J. Ryan Stinnett
b99243406b Move logs inside try block 2019-04-09 16:40:13 +01:00
Travis Ralston
0e9ec811b0 Merge pull request #890 from matrix-org/travis/cached-capabilities
Cache failed capabilities lookups for shorter amounts of time
2019-04-09 09:29:42 -06:00
Travis Ralston
6979177fb2 Log errors for capabilities requests 2019-04-09 09:27:38 -06:00
Travis Ralston
3aa8bfa6ca Flag v3 rooms as safe
The spec says they are, so we might as well too.
2019-04-09 09:25:07 -06:00
Travis Ralston
17b356b08e Merge pull request #891 from matrix-org/travis/fix-notifs
Fix highlight notifications for unencrypted rooms
2019-04-09 09:19:58 -06:00
Travis Ralston
f72ae490a8 Appease the linter 2019-04-09 09:05:20 -06:00
J. Ryan Stinnett
b0c3d0d2e3 Explicitly guard store usage during sync startup
This adds explicit `try` blocks in the spots where we interact with the store
during sync startup. This shouldn't be necessary as the store should already be
catching this and degrading as of
https://github.com/matrix-org/matrix-js-sdk/pull/884, but that doesn't seem to
have been enough for the affected user in
https://github.com/vector-im/riot-web/issues/7769, as they are seeing sync just
stop when storing without any further detail.
2019-04-09 15:06:54 +01:00
Travis Ralston
9dc344999e Fix highlight notifications for unencrypted rooms
A logic error introduced by https://github.com/matrix-org/matrix-js-sdk/pull/886 meant that all unencrypted rooms were not getting highlight notifications.
2019-04-08 15:57:44 -06:00
Travis Ralston
663c096400 Cache failed capabilities lookups for shorter amounts of time
This should fix https://github.com/vector-im/riot-web/issues/9225 for showing up too often/too long.
2019-04-08 12:24:00 -06:00
J. Ryan Stinnett
420b4d119d Merge pull request #889 from jryans/guard-missing-crypto
Document checking crypto state before using `hasUnverifiedDevices`
2019-04-08 16:56:13 +01:00
J. Ryan Stinnett
58b752c63b Document checking crypto state before using hasUnverifiedDevices
It's unclear what `hasUnverifiedDevices` should do when crypto is disabled on
the current device. Let's at least document that callers should first check
crypto status.
2019-04-08 16:24:25 +01:00
J. Ryan Stinnett
4740232fa4 Merge pull request #888 from jryans/degraded-storage
Add logging to sync startup path
2019-04-08 16:20:29 +01:00
J. Ryan Stinnett
0cc9994b8b Add logging to sync startup path
In https://github.com/vector-im/riot-web/issues/7769, we're seeing sync startup
fail to complete, but the actual error isn't being logged. Hopefully these extra
debug logs will provide more insight into the failing step.
2019-04-08 15:55:52 +01:00
Bruno Windels
1e78628b23 Merge branch 'master' into develop 2019-04-08 16:04:45 +02:00
Bruno Windels
00f5ddc93c v1.0.4 v1.0.4 2019-04-08 16:03:26 +02:00
Bruno Windels
f79f2105fd Prepare changelog for v1.0.4 2019-04-08 16:03:25 +02:00
Travis Ralston
828c51467f Refuse to set forwards pagination token on live timeline
Should fix the error seen in https://github.com/matrix-org/riot-web-rageshakes/issues/1389 (https://github.com/vector-im/riot-web/issues/8593)
2019-04-08 15:48:03 +02:00
Travis Ralston
963e271bce Refuse to link live timelines into the forwards/backwards position
See https://github.com/vector-im/riot-web/issues/8593#issuecomment-478681816

Previously (https://github.com/matrix-org/matrix-js-sdk/pull/873) we allowed half-linking timelines to each other if they satisfy the conditions, however this appears to not be helping. Instead, it seems like the timelines are getting stuck in a position where one direction is spliced but the other is broken. To avoid this case, we'll just avoid splicing in both directions when one of the directions is invalid.
2019-04-08 15:47:40 +02:00
Travis Ralston
0ab41215f0 Add a tiny bit of logging to work out what timelines are doing
See https://github.com/vector-im/riot-web/issues/8593
2019-04-08 15:47:21 +02:00
Travis Ralston
d153c4da07 log the timeline that broke 2019-04-08 15:47:03 +02:00
Travis Ralston
91aa783c3d Use better words for warnings 2019-04-08 15:46:56 +02:00
Travis Ralston
a54845bf76 Appease the linter 2019-04-08 15:46:48 +02:00
Travis Ralston
8a56a5f1ed Refuse splicing the live timeline into a broken position
Credit to Matthew for basically solving this.

Theoretically fixes spontaneous timeline corruption: https://github.com/vector-im/riot-web/issues/8593

When the live timeline ends up in a position where it can no longer be live (such as becoming the second timeline in the set, rather than the first) we end up getting neighbouring timeline errors. By refusing to splice the live timeline into such a position, we hopefully keep the live timeline in a position of still being live for when it is next used.

The running theory that leads to this fix is multiple limited syncs coming in, causing holes in the timeline. When trying to patch up the holes, the timeline set would end up splicing all over the place, leading to potentially splicing the live timeline into a broken position.
2019-04-08 15:46:41 +02:00
Travis Ralston
f585c80491 Merge pull request #886 from matrix-org/travis/e2e-notifs-2
Track e2e highlights better, particularly in 'Mentions Only' rooms
2019-04-08 07:40:31 -06:00
jkasun
c495b12cef change event redact, POST request to PUT request 2019-04-07 00:19:02 +05:30
Travis Ralston
1d6f7f862f Track e2e highlights better, particularly in 'Mentions Only' rooms
Fixes https://github.com/vector-im/riot-web/issues/9280

The server is unable to calculate encrypted highlights for us, so we calculate them. This also means the server always sends a zero for highlight_count, and therefore in sync.js we now trust our judgement over the server's. In future, this check will need to be altered to support server-side encrypted notifications if that happens. This fixes the part of 9280 where the badge count ends up disappearing unless the message received also happens to be a mention.

The changes in client.js are more to support rooms which are mentions only. Because the server doesn't send an unread_count for these rooms, the total notifications will always be zero. Therefore, we try and calculate that. In order to do that, we need to assume that our highlight count is also wrong and calculate it appropriately.
2019-04-05 14:49:38 -06:00
Hubert Chathi
0a82c84006 Merge pull request #882 from uhoreg/fix_mac
support both the incorrect and correct MAC methods
2019-04-05 16:45:45 -04:00
Travis Ralston
a614a02b90 Merge pull request #885 from matrix-org/travis/refuse-forwards-token
Refuse to set forwards pagination token on live timeline
2019-04-05 11:54:33 -06:00
Travis Ralston
0945e2c5c6 Refuse to set forwards pagination token on live timeline
Should fix the error seen in https://github.com/matrix-org/riot-web-rageshakes/issues/1389 (https://github.com/vector-im/riot-web/issues/8593)
2019-04-05 11:36:01 -06:00
J. Ryan Stinnett
b1b49413d0 Merge pull request #884 from jryans/degraded-storage
Degrade `IndexedDBStore` back to memory only on failure
2019-04-05 11:32:42 +01:00