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

719 Commits

Author SHA1 Message Date
Kegan Dougal
8c6c65ab6c Don't do requests we know are going to fail as a guest 2016-01-05 11:50:24 +00:00
Richard van der Hoff
b85e267fdb Merge pull request #59 from matrix-org/rav/event_context
Enhancements to search results, and event context implementation

This change adds support to the JDK for processing the results of a room
search, as well as back-paginating the results.

It treats each search result as a 'context' object, which can itself be
backwards or forward-paginated.
2016-01-04 12:50:10 +00:00
Richard van der Hoff
c669d21af7 Enhancements to search results, and event context implementation
This change adds support to the JDK for processing the results of a room
search, as well as back-paginating the results.

It treats each search result as a 'context' object, which can itself be
backwards or forward-paginated.
2016-01-04 12:50:07 +00:00
Kegsay
3e4cef89fd Merge pull request #58 from matrix-org/notif_sync
Propagate the unread count from sync onto rooms
2015-12-23 10:07:13 +00:00
David Baker
a06d1f62d7 Merge remote-tracking branch 'origin/develop' into notif_sync 2015-12-22 14:47:39 +00:00
Kegan Dougal
2802092231 Add 60s to client-side timeout to account for slow HSes 2015-12-21 13:49:14 +00:00
Richard van der Hoff
a419e241a6 Merge pull request #57 from matrix-org/rav/search_backfill
Allow passing a next_batch token into /search for backfill
2015-12-21 09:15:53 +00:00
David Baker
7aa4bd7f46 Propagate unread notif count from sync to the room object 2015-12-18 17:49:42 +00:00
Kegsay
2eec76bc1d Merge pull request #56 from matrix-org/kegan/archived-rooms
Add syncLeftRooms()
2015-12-18 16:57:17 +00:00
Richard van der Hoff
13fcff9688 Allow passing a next_batch token into /search for backfill 2015-12-18 16:23:48 +00:00
Kegan Dougal
1174147d64 Don't lie in comments; remove spurious flag setting 2015-12-18 15:29:28 +00:00
Kegan Dougal
de53b292a2 Remove debug logging 2015-12-18 15:21:28 +00:00
Kegan Dougal
b50d61428c Impl syncing of left rooms. Factor out getting or creating filters. 2015-12-18 11:57:46 +00:00
Kegan Dougal
4bc5343b67 Merge branch 'develop' into kegan/archived-rooms 2015-12-18 09:47:43 +00:00
Kegan Dougal
da560ffeff Fix SYJS-38 - Events stuck in 'sending' state
v1 used to clobber events after sending so `.status` would be `null`. v2 is
smarter and just clobbers the `.event` data so references to the local echo
event would reflect the new event. However, the `.status` in this case would
still have the old value (SENDING), so make sure to reset it after the 200 OK
from sending the event.
2015-12-18 09:14:48 +00:00
Kegan Dougal
59965b1c59 Add public api for syncing left rooms. Not implemented yet. 2015-12-17 17:17:53 +00:00
Kegsay
431f4a4797 Merge pull request #55 from matrix-org/kegan/sync-exp-backoff
Reset /sync backoff if setTimeout takes a long time to fire
2015-12-17 16:42:22 +00:00
Kegan Dougal
40c3fe558c Add note stating when timing delays can occur. 2015-12-17 16:31:00 +00:00
Kegan Dougal
a12cd8d4a0 Fix JSDoc 2015-12-17 16:18:28 +00:00
Kegan Dougal
ac7a469582 Add setIncludeLeaveRooms 2015-12-17 15:53:56 +00:00
Kegan Dougal
2e9376614f BREAKING: Add bindEmail option to register() 2015-12-17 14:13:17 +00:00
Kegan Dougal
cd9d1daf17 Reset /sync backoff if setTimeout takes a long time to fire
This fixes vector-web/vector-im#536

The bug here is that we were assuming `setTimeout` would fire after the
requested time. This is not true when the machine is asleep. We now timestamp
before and after `setTimeout` and reset the attempt count if we have waited
more than twice what we originally requested. This allows for some jitter which
is to be expected.
2015-12-17 11:27:21 +00:00
Kegan Dougal
bfa8dd0007 Cache the local event ID else we can remove a real event. Fixes vector-im/vector-web#530 2015-12-16 17:51:12 +00:00
Kegan Dougal
7e35ef258f Delete the room when it is forgotten and fire a new experimental event 2015-12-16 16:25:09 +00:00
Kegan Dougal
8bd43a8d53 Add /forget 2015-12-16 15:57:29 +00:00
Kegsay
8b87c0045d Merge pull request #54 from matrix-org/kegan/stale-call-notifications
Do not erroneously emit Call.incoming events on startup
2015-12-15 17:03:03 +00:00
Kegan Dougal
77356f0007 Fix vector-im/vector-web#494 2015-12-15 16:54:26 +00:00
Kegan Dougal
4cd6f615b3 Do bear minimum leave room handling so rejecting invites / leaving rooms are displayed correctly. 2015-12-15 16:21:36 +00:00
Kegan Dougal
65ef1dfd75 Lint and tests 2015-12-15 15:57:24 +00:00
Kegan Dougal
5719d513b7 Strip protocol part when doing 3PID invites for. Partially fixes vector-im/vector-web#419 2015-12-15 15:52:52 +00:00
Kegsay
b90697264c Follow the spec 2015-12-15 15:33:56 +00:00
Kegan Dougal
406a2bb001 Do not erroneously emit Call.incoming events on startup
Check to see if the call was answered or hung up in addition to having a valid
lifetime before emitting the event. Fixes vector-im/vector-web#344
2015-12-15 15:13:41 +00:00
Kegsay
3115043b94 Merge pull request #53 from matrix-org/kegan/v2-sync
Use /sync instead of /initialSync and /events
2015-12-15 14:24:26 +00:00
Kegan Dougal
bfda04daea Move local timeout logic to the HTTP API class. Fixes /sync bug
The ability to set a local timeout is applicable to any request, so move it
to http-api.js - We only use this on /sync requests currently. This simplifies
the SyncApi since it doesn't need to worry about it anymore -- the request
promise just gets rejected if the timer expires.

Whilst testing I noticed a weird anomaly which I cannot explain. Playing with
Chrome's network debugger, once you recover from a black hole (0kbps, 90s RTT)
the subsequent requests take 20s to return *even though there is no throttling*.
This was causing issues when using a local timer of timeout= and BUFFER_PERIOD_MS
when timeout=1 due to attempts>1 - they were being knifed before the response
could return. The 20s latency was entirely artifical (checked synapse logs and
they were sub 1s), but I cannot find anywhere in the JS-SDK or browser-requests
where this would be the cause. This persisted even when BUFFER_PERIOD_MS was
changed from 20s to 10s.
2015-12-15 11:59:41 +00:00
Kegan Dougal
46504b8b9f Fix tests; need more paranoia 2015-12-14 14:16:47 +00:00
Kegan Dougal
f48c9175e5 Linting 2015-12-14 14:12:49 +00:00
Kegan Dougal
bd4d8433ab Fix catchup bugs caused by using a stale pagination token 2015-12-14 14:11:25 +00:00
Kegan Dougal
a00e318d73 Fix pagination - set prev_batch at the right time 2015-12-14 12:28:04 +00:00
Kegan Dougal
fcf1abb185 Use v2 transaction IDs to suppress dupes without linear scans of the timeline! 2015-12-14 11:35:50 +00:00
Kegan Dougal
13cab79e04 Revert prev commit - emit SYNCING>SYNCING and now comment why we do this 2015-12-14 10:31:27 +00:00
Kegan Dougal
fc6ce20e14 Check unsigned.age for getAge() for v2. Don't spam SYNCING emissions. 2015-12-14 10:27:53 +00:00
Kegan Dougal
9c49d26525 Linting 2015-12-14 09:24:33 +00:00
Kegan Dougal
d6299b634c Scope filter keys in localStorage on user_id 2015-12-14 09:22:02 +00:00
Kegan Dougal
a6f64b5f03 v2 filter test 2015-12-11 15:27:40 +00:00
Kegan Dougal
465635444f s/user_id/sender/g in tests 2015-12-11 15:07:40 +00:00
Kegan Dougal
eedff29acb Add filter stub to crypto test 2015-12-11 13:35:46 +00:00
Kegan Dougal
7c43d15ea5 More linting; crypto test fix 2015-12-11 13:31:26 +00:00
Kegan Dougal
de32ac0c44 Fix linting 2015-12-11 13:23:46 +00:00
Kegan Dougal
3d9d31d6b1 Fix remaining integration tests 2015-12-11 13:22:27 +00:00
Kegan Dougal
b219836b3e Fix a bunch of integration tests 2015-12-11 12:53:26 +00:00