1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-12-14 19:22:15 +03:00
Commit Graph

2775 Commits

Author SHA1 Message Date
David Baker
567716c4f7 Use more normal promise structure 2016-02-23 11:21:29 +00:00
David Baker
518e41c078 add docs 2016-02-23 11:08:07 +00:00
David Baker
bd600f65fb Add support for new keypair style 3pid invites (add an option to joinRoom for specifying the signing url) 2016-02-23 10:11:04 +00:00
Matthew Hodgson
363b08c4d8 don't NPE on 50x's - as per BOTS-170 2016-02-22 10:34:43 +00:00
Matthew Hodgson
2150bdc444 fix tests 2016-02-19 17:59:26 +00:00
Matthew Hodgson
5886b3358d f1x l1nt 2016-02-19 17:56:55 +00:00
Matthew Hodgson
8b887d8559 name 3PID invite rooms better 2016-02-19 17:45:57 +00:00
Richard van der Hoff
7278c38fa6 Merge pull request #83 from matrix-org/rav/fix_context_event_ordering
Interpret the response from /context correctly
2016-02-19 17:12:48 +00:00
Richard van der Hoff
24ae4a8d1a Interpret the response from /context correctly
events_before are backwards

Fixes https://github.com/vector-im/vector-web/issues/963
2016-02-19 17:03:47 +00:00
David Baker
923b9cad39 Merge pull request #82 from matrix-org/real_receipts
Add a param to getEventReadUpTo to have it ignore implicit read receipts
2016-02-19 16:20:04 +00:00
David Baker
e9f6e41550 Local echos are fake too. 2016-02-19 16:18:29 +00:00
David Baker
2950417f70 Add docs to appease jslint 2016-02-19 15:35:36 +00:00
David Baker
39f641a851 Address PR comments 2016-02-19 15:22:38 +00:00
David Baker
95fff38dbb Add a param to getEventReadUpTo to have it ignore implicit read receipts. Store real receipts separately to make this work. 2016-02-19 14:42:07 +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
1baf14861c Merge pull request #81 from matrix-org/rav/fix_timeline_after_join
EventTimeline: Fix baseIndex after removing the last event
2016-02-17 12:23:29 +00:00
Richard van der Hoff
8e47fe2968 Fix lint 2016-02-16 22:32:50 +00:00
Richard van der Hoff
88827fab84 EventTimeline: Fix baseIndex after removing the last event
Removing the last event in an EventTimeline (as we might, for instance, if it
was a local echo in an empty timeline) got us into a state where the baseIndex
would increment when adding events to the end of the timeline, causing much
confusion.
2016-02-16 22:22:26 +00:00
Richard van der Hoff
ab0a06eea7 More delinting 2016-02-16 16:19:32 +00:00
Richard van der Hoff
6a6db36088 delintificate 2016-02-16 16:14:45 +00:00
Richard van der Hoff
6f3bdcfbb6 Remember to propagate Room.redaction 2016-02-16 16:03:40 +00:00
Richard van der Hoff
4c6d0a5128 Redactions: only remove the keys that are specced for removal 2016-02-16 16:03:18 +00:00
Richard van der Hoff
5eff278454 Keep redacted events in the timeline
Everything gets confused when we remove events from timelines, so keep
redacted events in there, and mark them as redacted instead.
2016-02-16 12:05:13 +00:00
David Baker
c8d1e210a3 Merge pull request #79 from matrix-org/dbkr/new_reconnection_logic
Use only /versions requests for connection recovery
2016-02-10 11:17:29 +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
5c8f73019e lint 2016-02-09 16:22:12 +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
620417ed1b Merge pull request #78 from matrix-org/daniel/r0
Use /r0 or /unstable for all requests
2016-02-08 11:57:13 +00:00
Daniel Wagner-Hall
02196416e4 Use /r0 or /unstable for all requests 2016-02-08 11:15:30 +00:00
Richard van der Hoff
5ca4bc6b85 Merge pull request #77 from matrix-org/rav/check_old_timelines_for_echoes
Check old timelines when looking for echoes of sent messages
2016-02-05 19:41:37 +00:00
Richard van der Hoff
76c79ec299 Check old timelines when looking for echoes of sent messages
After /send completes, we check the room to see if the echo has already come
back via /sync. It's a bit of an edge-case, but we ought to check all
timelines, not just the live one.

Furthermore, we now have a map from eventId to timeline, so we can handle the
case where the echo has *not* yet come back more efficiently than searching
through the whole timeline.
2016-02-05 17:31:46 +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
122867e8ee Merge pull request #75 from matrix-org/rav/read_receipt_ordering
Give precedence to later Read Receipts
2016-02-04 16:50:59 +01:00
Richard van der Hoff
f3e5e03009 Give precedence to later Read Receipts
In order to resolve the conflict between local and remote read-receipts, try to
give precedence to the read-receipt which refers to the most recent event.

Also fix the read-receipt synthesis in _addLiveEvents so that it actually works
(drop the spurious MatrixEvent wrapper), and remove the synthesis in
recalculate() (which appears to be redundant).
2016-02-04 15:35:27 +00:00
Richard van der Hoff
1b43e5ed98 Merge pull request #74 from matrix-org/rav/fix_localecho_timeline_bug
Fix a bug which made the timelines get confused about local messages
2016-02-03 15:41:52 +01:00
Richard van der Hoff
9e65f12ddd Fix lint warnings 2016-02-03 14:29:39 +00:00
Richard van der Hoff
be297ddbcd Merge pull request #73 from matrix-org/rav/fix_timeline_tightloop
Make sure we don't end up calling /messages in a loop if things go weird
2016-02-03 15:14:41 +01:00
Richard van der Hoff
8ee1d17ff7 Fix a bug which made the timelines get confused about local messages
Make sure that the timeline index is kept consistent when the id of an event
changes when we receive the remote echo of a message we sent.
2016-02-03 11:56:09 +00:00
Richard van der Hoff
a2185fefc1 Make sure we don't end up calling /messages in a loop if things go weird
If we somehow end up in a situation where calling /messages returns a load
of messages, but none of them are new, then currently we start calling
/messages again and again in a tight loop. This is bad, so fix it.
2016-02-03 11:47:04 +00:00
David Baker
f172272dd3 Merge pull request #72 from matrix-org/dbkr/document_getroom
Add docs to getRoom noting how you shouldn't assume it will return so…
2016-02-02 17:16:30 +00:00
David Baker
8a77b29d17 Add docs to getRoom noting how you shouldn't assume it will return something because you've got a Room-like event 2016-02-02 16:30:28 +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