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

531 Commits

Author SHA1 Message Date
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
David Baker
04a1c4f1a2 Revert "Separate the actual processing of the sync response from the loop doing the requests."
This reverts commit 5297855ad3.

Accidentally committed to wrong branch
2016-01-29 11:17:12 +00:00
David Baker
5297855ad3 Separate the actual processing of the sync response from the loop doing the requests. 2016-01-29 11:05:32 +00:00
Richard van der Hoff
8db95f42fb Add some unit tests for TimelineWindow. 2016-01-28 16:38:45 +00:00
Richard van der Hoff
b42e5d5fcf Address review comments
Rearrange a couple of things for clarity, and add some comments.
2016-01-28 12:36:12 +00:00
Richard van der Hoff
b1e2090eef TimelineWindow object
A handy thing for tracking a window into a room timeline

Could really do with some unit tests... sorry.
2016-01-27 09:53:15 +00:00
Richard van der Hoff
3c2fad7c8d Merge remote-tracking branch 'origin/develop' into rav/context 2016-01-27 09:49:00 +00:00
Richard van der Hoff
a87cefa035 Replace the boolean args on EventTimeline methods with constants 2016-01-26 22:38:26 +00:00
Richard van der Hoff
a01501b42c Address a number of review comments.
Make sure that room state is copied correctly when resetting the live
timeline.

Also comments and bits.
2016-01-26 18:09:15 +00:00
David Baker
0c3abcccf2 camelCase 2016-01-26 14:11:36 +00:00
Richard van der Hoff
48d1bc3158 Fix incompatibility with peeking.
The peek code needs to make sure it sets the pagination token /after/ adding
the events to the timeline, otherwise it will get reset when the events
are added.
2016-01-26 11:21:49 +00:00
David Baker
15e8784daf Add local echo for read receipts. Fixes https://github.com/vector-im/vector-web/issues/623 2016-01-25 17:49:41 +00:00
Richard van der Hoff
840b8f0bc0 Merge branch 'develop' into rav/context
Conflicts:
	lib/models/room.js
2016-01-25 10:45:22 +00:00
Kegan Dougal
f8ec35691f Interrupt /sync backoff when keep-alive succeeds in order to immediately retry if we were waiting 2016-01-21 18:02:26 +00:00
Kegan Dougal
c5e7df8975 Hit /versions instead of / since it is actually a known endpoint 2016-01-21 17:52:52 +00:00
Kegan Dougal
7bdab05785 Unbreak tests 2016-01-21 17:34:12 +00:00
Kegan Dougal
197144dcda Implement a keep-alive timer for /sync requests
When a /sync request fails, we spin up a keep-alive poll to /_matrix/client/r0
which 400s. We treat any HTTP response code as a success for the purposes of
polling the server. When a successful poll is done, we shoot the current /sync
request in the head immediately (via a hacky abort() on the promise) and retry
the /sync.
2016-01-21 17:17:27 +00:00
Kegan Dougal
ff990914b2 Remove low client-side timeouts hack 2016-01-21 16:12:07 +00:00
David Baker
1f1d743678 Merge remote-tracking branch 'origin/develop' into dbkr/new_unread_count_format 2016-01-21 09:50:20 +00:00
Matthew Hodgson
24655ac60e missing semicolon 2016-01-21 00:02:24 +00:00
Matthew Hodgson
eaf7b03bb1 if we are the only person in a room, call it an 'Empty room' too, given this is how humans see a room if they're the only person in it... 2016-01-20 23:55:09 +00:00
David Baker
a24a9d35c4 Fix PR comments: typos and redundant line 2016-01-20 18:52:32 +00:00
David Baker
b4e4aaff00 Merge branch 'develop' into dbkr/new_unread_count_format 2016-01-20 17:25:54 +00:00
Matthew Hodgson
3a73b54e4a .name defaults to mxid 2016-01-20 17:22:16 +00:00
David Baker
5ec0fce2a4 style 2016-01-20 17:19:26 +00:00
Matthew Hodgson
8b7497374f name self-chats by displayname if possible rather than mxid, and name empty-chats as 'Empty room' rather than the fugly '?' 2016-01-20 17:19:13 +00:00
David Baker
8cb180525e Add getter/setter for unread notif counts. 2016-01-20 17:16:20 +00:00
David Baker
b3c06dd723 Update for new unread count format 2016-01-20 15:59:06 +00:00
Kegan Dougal
2a88b8db4e Improve performance of hasMembershipState to not be stupid 2016-01-20 15:09:35 +00:00
Kegan Dougal
865db906e3 Make getUsers() return users for *EEEEEVERYOOOOONE* regardless of presence events 2016-01-19 11:40:08 +00:00
manuroe
80f7220a7b Merge branch 'develop' into push-rules-settings
# Conflicts:
#	lib/sync.js
2016-01-18 17:33:13 +01:00
manuroe
2e664adb32 Updated push rules methods after review 2016-01-18 17:22:35 +01:00
Richard van der Hoff
e0ddd65922 Address review comments
Improve comments and naming.
2016-01-15 23:50:09 +00:00
Richard van der Hoff
dfb2fa821d minor jsdoc fixes 2016-01-15 17:11:00 +00:00
Richard van der Hoff
fce7248ed5 Flag the top of the timeline when we hit it 2016-01-15 17:10:01 +00:00
Richard van der Hoff
e68ab7d54a Tweak duplicateStrategy code to reduce diff 2016-01-15 13:23:51 +00:00
Richard van der Hoff
706966ffe9 Support for non-contiguous event timelines
This provides optional support for fetching old events via the /context API,
and paginating backwards and forwards from them, eventually merging into the
live timeline.

To support it, events are now stored in an EventTimeline, rather than directly
in an array in the Room; the old names are maintained as references for
compatibility.

The feature has to be enabled explicitly, otherwise it would be impossible for
existing clients to back-paginate to the old events after a gappy /sync.

Still TODO here:

* An object which provides a window into the timelines to make them possible to
  use. This will be a separate PR.

* Rewrite the 'EventContext' used by the searchRoomEvents API in terms of an
  EventTimeline - it is essentially a subset.
2016-01-15 13:19:11 +00:00
manuroe
e3b4cb03e1 Fixed Jenkins tests complaints 2016-01-14 19:17:08 +01:00
manuroe
8011aab561 Added MatrixClient getRoomPushRule and setRoomMutePushRule methods 2016-01-14 18:58:15 +01:00
Matthew Hodgson
a8d24798e6 oooooooops... let's pretend nobody saw this 2016-01-14 17:23:04 +00:00
Kegan Dougal
e4c38ac78c Linting 2016-01-13 15:31:27 +00:00
Kegan Dougal
5fa6f0037f Cache the third_party_invite token to allow constant time lookups 2016-01-13 15:31:27 +00:00
Matthew Hodgson
a0df2a70cd s/getImplicitRoomName/getDefaultRoomName/ # as kegan doesn't like the word 'implicit' 2016-01-13 14:02:26 +00:00
Kegan Dougal
0bab00c47c Add debug logging to sync polling. Add speculative fix for vector-im/vector-web#544 2016-01-13 13:17:21 +00:00
Matthew Hodgson
8810ff2256 merge and add null check 2016-01-13 12:58:46 +00:00
Matthew Hodgson
17efc5163f Merge branch 'develop' into matthew/roomsettings2 2016-01-13 12:55:30 +00:00
Matthew Hodgson
3ce07a020d ooops - fix getDomain expression 2016-01-13 12:52:22 +00:00
Matthew Hodgson
71abef0117 fix merge conflict 2016-01-13 12:46:47 +00:00
Matthew Hodgson
a79270b8f8 Merge pull request #61 from matrix-org/matthew/accountdata
implement account data
2016-01-13 12:43:53 +00:00
Matthew Hodgson
87db054e22 fix jsdoc 2016-01-13 12:43:42 +00:00