Matthew Hodgson
a9d3ae4ef8
fix tests
2016-09-09 16:34:02 +01:00
Matthew Hodgson
93f45c0a94
reemit notif timeline events correctly
2016-09-09 02:28:01 +01:00
Matthew Hodgson
2e4c362ccd
make /notification pagination actually work
2016-09-09 02:08:39 +01:00
Matthew Hodgson
e4ec2aa55f
maintain the global notification timeline set.
...
* track notifTimelineSet on MatrixClient
* stop Rooms from tracking notifTimelineSet as they don't need to
* Implement client.paginateNotifTimelineSet
* make Events store their pushActions properly
* insert live notifs directly into the notifTimelineSet in /sync, ordering by origin_server_ts.
2016-09-08 02:57:49 +01:00
Matthew Hodgson
9b507f6c6c
Merge branch 'develop' into matthew/filtered-timelines
2016-09-07 20:34:57 +01:00
Richard van der Hoff
9c18893ae5
Use to-device events for key sharing
...
Synapse now supports out-of-band messages, so use them instead of sending the
key-sharing messages in-band.
2016-09-07 13:56:54 +01:00
Matthew Hodgson
ed5c061566
move getOrCreateClient from sync.js to client.js
2016-09-05 02:44:24 +01:00
David Baker
0ba1a1dabc
Update our push rules when they come down stream
...
Also expose a useful function from pushprocessor.
Fixes https://github.com/vector-im/vector-web/issues/1495
2016-08-15 18:40:12 +01:00
Richard van der Hoff
cc08de9c64
Make sure we actually stop the sync loop on logout
...
I think this was only a problem in the edgiest of edge conditions, but it
certainly didn't look right.
2016-08-11 01:13:52 +01:00
Matthew Hodgson
1412646a55
fix review feedback
2016-07-20 15:40:58 +01:00
Matthew Hodgson
c00a830cbb
fix nightmare bug where Room.accountData wasn't being emitted by Room objects
2016-07-20 11:59:38 +01:00
Matthew Hodgson
58a68106bc
generic account data support
2016-07-18 01:40:05 +01:00
David Baker
ecb31b5aaf
Add more events to User
...
There was no way of observing changes to fields like currentlyActive, so add this and add one for lastPresenceTs that will be fired whenever we get a presence event.
2016-07-14 09:38:50 +01:00
Richard van der Hoff
d87e5471fa
Refactor the addition of events to rooms
...
... and add some sanity checks
Two things here:
1. Clean up the Room API for adding new events to the timeline. Where before
we had addEvents and addEventsToTimeline, whose purposes were unclear, we now
have addLiveEvents which must be used for adding events to the end of the live
timeline, and addEventsToTimeline which should be used for pagination (either
back-pagination of the live timeline, or pagination of an old timeline).
2. Add some sanity checks for the live timeline. Today we have seen problems
where somehow the live timeline had gained a forward pagination token, or the
live timeline had got joined to another timeline, leading to much confusion -
and I would like to notice these sooner.
2016-04-14 17:03:25 +01:00
Richard van der Hoff
3404751eb9
Clean up test shutdown
...
Make sure that the integration tests actually kill off all of their timers, so
that jasmine exits cleanly.
This probably also fixes https://github.com/vector-im/vector-web/issues/1365 .
2016-04-14 12:01:23 +01:00
Richard van der Hoff
0282021e09
Add a cachebuster to initial /sync
...
... in the hope of fending off weird firefox restore issues
2016-04-13 22:17:10 +01:00
Richard van der Hoff
526e1d59e9
Log sync token when starting sync loop
...
A little bit of debug that might help with
https://github.com/vector-im/vector-web/issues/1354
2016-04-13 14:08:59 +01:00
Richard van der Hoff
1d2c705e13
Fix a bug where we recreated sync filters
...
Fix the object comparison used for client filters (JSON.stringify is
non-deterministic)
2016-04-06 15:56:32 +01:00
Matthew Hodgson
77101823f5
track kicked rooms correctly
2016-03-19 02:18:37 +00:00
Richard van der Hoff
eaf3fe16eb
sync error: Don't log the exception twice
...
If we have e.stack, then it will include the description of the exception.
2016-03-17 12:05:01 +00:00
Richard van der Hoff
963eaf7ec7
Log the stack when we get a sync error
...
If we have the stack for an exception in the /sync loop, we should log it.
2016-03-17 11:54:43 +00:00
Matthew Hodgson
6fff29c07b
oops, that map should be a forEach
2016-03-16 11:54:56 +00:00
Matthew Hodgson
db9ba52873
make presence work when peeking. fixes https://github.com/vector-im/vector-web/issues/780
2016-03-15 21:50:18 +00:00
David Baker
d13fbd0e3e
fix lint
2016-03-14 17:13:01 +00:00
David Baker
5e18c84e53
Add a delay before we start polling the connectivity check endpoint to avoid tightlooping if the conn check succeeds but /sync etc fails.
2016-03-14 16:50:00 +00:00
Richard van der Hoff
78eded3bbd
Emit an event when a local-echo is turned into a proper event
...
We need to trigger an update of the timeline when this happens, so raise an
event for it.
2016-03-08 15:00:19 +00:00
Richard van der Hoff
0034bdf4ad
Set the back-pagination token before raising Room.timelineReset
...
This fixes another race condition on gappy syncs, wherein we weren't
back-paginating back from the start of the gappy sync.
2016-03-01 13:35:22 +00:00
Richard van der Hoff
e287e7591b
Merge pull request #91 from matrix-org/rav/fix_stuck_pagination_after_join
...
Don't reset the timeline when we join a room after peeking
2016-03-01 09:10:21 +00:00
Richard van der Hoff
a14f9e6d1c
Don't reset the timeline when we join a room after peeking
...
If we've already got all the events in a limited sync, there is no need to reset
the timeline.
2016-02-29 17:25:20 +00:00
Richard van der Hoff
abf908b14f
Fire a 'Room.timelineReset' event when we get a gappy sync
...
We need to reset things at the UI level when we get a gappy sync, so give the
clients something to listen for.
Also add a bunch of tests for that bit of code.
2016-02-25 18:26:11 +00:00
Richard van der Hoff
6a19e08381
lint
2016-02-24 15:58:35 +00:00
Richard van der Hoff
43f392955d
Check filters before we reuse them
...
Make sure that we check the content of existing filters before we blindly reuse
them.
Fixes https://github.com/vector-im/vector-web/issues/988
2016-02-24 15:23:42 +00:00
Richard van der Hoff
785326376a
Merge pull request #80 from matrix-org/rav/keep_redactions
...
Keep redacted events in the timeline
2016-02-17 21:41:42 +00:00
Richard van der Hoff
6f3bdcfbb6
Remember to propagate Room.redaction
2016-02-16 16:03:40 +00:00
David Baker
8614632e54
No ES6 in the JS SDK and other lint warnings.
2016-02-10 10:48:03 +00:00
David Baker
c3796c61cd
Use a promise for when the connection comes back
2016-02-10 10:40:42 +00:00
David Baker
6224aff882
improve comment as per PR review
2016-02-10 10:09:39 +00:00
David Baker
e506a1b2de
Oops: set keepAliveTimer!
2016-02-09 17:39:30 +00:00
David Baker
b40a6d1481
remember bound function as it returns a new reference each time
2016-02-09 17:06:20 +00:00
David Baker
3cfc4f8ba5
Add short delay to treating a 400 as a success to avoid hammering in a loop.
2016-02-09 16:17:52 +00:00
David Baker
4d46251b15
Just use the keepalive logic to recover from lost internet connections.
...
* This should fix the problem where we could end up with two concurrent syncs
due to both retrying /sync and hitting /versions. There is now one and only
one mechanism for connection recovery.
* Hit /versions a little less often as I think every 2 seconds is a little
over-aggressive. Also introduce randomness to minimize possibility of
thundering herds.
* Add a listener for the 'online' event in case any browser is nice enough
to ever fire it.
* Treat a 400 response from /versions as successful since older synapses
will not support it.
2016-02-09 16:08:14 +00:00
David Baker
977e33f1bd
Merge pull request #76 from matrix-org/dbkr/sync_gutwrench_less
...
Change the sync state tracking slightly to gut-wrench client a bit less
2016-02-08 14:18:59 +00:00
David Baker
daa0e6291e
Add docs for STOPPED state and correct js doc
2016-02-08 14:18:15 +00:00
Daniel Wagner-Hall
02196416e4
Use /r0 or /unstable for all requests
2016-02-08 11:15:30 +00:00
David Baker
fc730d4637
remove unintentional log line
2016-02-05 14:13:14 +00:00
David Baker
41d5917bb6
Change the sync state tracking slightly to gut-wrench client a bit less
...
Should be functionally identical outside of client and sync.
2016-02-05 14:09:58 +00:00
Richard van der Hoff
0a7efe3e8b
Fix undefined variable accesses
...
fix a merge error in the last commit
2016-01-30 00:44:40 +00:00
Richard van der Hoff
2af947fc1a
Stash the old next_batch token for pagination
...
When we reset the live timeline due to a limited sync, stash next_batch as the
pagination token so that we can work forward to the new live timeline.
(Note that this requires matrix-org/synapse#535 )
2016-01-30 00:12:31 +00:00
David Baker
3d5e2937e2
docstring
2016-01-29 11:29:14 +00:00
David Baker
bbf3b2637a
Re-apply: 5297855ad3
...
Separate the actual processing of the sync response from the loop doing the requests.
2016-01-29 11:25:01 +00:00