Richard van der Hoff
a493a0ddb3
Fix lint errors
2016-04-07 14:30:35 +01:00
Richard van der Hoff
7573171d05
Avoid paginating forever in private rooms
...
In TimelineWindow.paginate, keep a count of the number of API requests we have
made, and bail out if it gets too high, to ensure that we don't get stuck in a
loop of paginating right back to the start of the room.
2016-04-07 14:16:02 +01:00
Richard van der Hoff
384c474800
fix failure of deepCompare to compare arrays
...
what a difference a character can make
2016-04-06 18:14:34 +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
c469ff4c8d
oops, fix sig
2016-04-03 01:19:34 +01:00
Matthew Hodgson
c7575f3f16
cache url preview results
2016-04-03 01:18:01 +01:00
Matthew Hodgson
415251dd70
WIP url previewing
2016-03-31 18:38:34 +01:00
Richard van der Hoff
d2adb30ded
Implement HTTP callbacks in realtime
...
Hopefully this will improve our recovery time after a laptop is suspended. The
idea is to treat the timeouts on the http apis as being in realtime, rather
than in elapsed time while the machine is awake.
To do this, we add a layer on top of window.setTimeout. We run a callback every
second, which then checks the wallclock time and runs any pending callbacks.
2016-03-31 13:51:18 +01:00
David Baker
57f88b00ba
d'oh, no es6 in js-sdk
2016-03-24 13:57:55 +00:00
David Baker
e618ad9589
Only count joined members for the member count in notifications. Fixes https://github.com/vector-im/vector-web/issues/1067
2016-03-24 13:55:30 +00:00
David Baker
d7b3b91eec
Failed to remove extra param
2016-03-23 17:08:22 +00:00
David Baker
88cc63e2a2
Add maySendEvent to match maySendStateEvent. Make them use the same function internally. Also add convenience maySendMessage. Also tests.
2016-03-23 15:10:51 +00:00
Matthew Hodgson
cfc10fa82d
fix invite picker info again...
2016-03-23 12:03:56 +00:00
Matthew Hodgson
e1415d9829
Merge pull request #117 from matrix-org/matthew/roomlist
...
get/setRoomVisibility API
2016-03-22 12:30:18 +00:00
Richard van der Hoff
19a12b3c79
Merge pull request #115 from matrix-org/rav/txnid_clashes
...
Include a counter in generated transaction IDs
2016-03-22 12:20:02 +00:00
Matthew Hodgson
bec41e4f94
incorporate review
2016-03-22 10:20:02 +00:00
Matthew Hodgson
5f177aeec4
get/setRoomVisibility API
2016-03-22 00:55:53 +00:00
Matthew Hodgson
b422916452
add to existing users if present, to avoid destroying presence data
2016-03-21 18:15:55 +00:00
Matthew Hodgson
10378c0e7f
Merge pull request #116 from matrix-org/matthew/fix-invite-picker-info
...
update store user metadata based on membership events rather than presence
2016-03-21 16:12:42 +00:00
Matthew Hodgson
fba4d5fb0a
Merge pull request #114 from matrix-org/matthew/stop-peeking
...
API to stop peeking
2016-03-21 16:12:29 +00:00
Matthew Hodgson
77101823f5
track kicked rooms correctly
2016-03-19 02:18:37 +00:00
Matthew Hodgson
15bc608368
presence no longer returns profile data, so we have to update our store's users based on membership events instead
2016-03-19 01:45:10 +00:00
Richard van der Hoff
dfc4b34d09
Include a counter in generated transaction IDs
...
Fixes a flaky test which sometimes failed due to sending two events in the same
millisecond.
2016-03-18 21:32:15 +00:00
Richard van der Hoff
ad9daecbd4
Pass the right options into SyncApi when peeking
...
When we peek into a room, we create its Room object. We need to make sure it is
created with the same options as we would if it were created via the /sync
calls.
Save the options passed in when startClient is called, and then pass them into
the SyncApi each time we create it.
2016-03-18 20:59:23 +00:00
Matthew Hodgson
d29302716d
oops
2016-03-18 19:25:22 +00:00
Matthew Hodgson
6c7d13f8ce
API to stop peeking
2016-03-18 19:22:34 +00:00
Richard van der Hoff
e15a2d138c
Merge pull request #112 from matrix-org/rav/cancel_send
...
Support for cancelling pending events
2016-03-18 16:17:44 +00:00
Richard van der Hoff
8bc9c19278
Merge pull request #111 from matrix-org/rav/pending_event_list
...
Implement 'pendingEventList'
2016-03-18 16:17:30 +00:00
David Baker
ba1991aa8f
Add more docs :)
2016-03-18 15:54:19 +00:00
David Baker
f4fd8d9ba6
Add a method to the js sdk to look up 3pids on the ID server.
2016-03-18 15:15:10 +00:00
Richard van der Hoff
02be0f659a
Support for cancelling pending events
...
Implement client.cancelPendingEvent which will cancel queued or not_sent events
2016-03-17 22:15:46 +00:00
Richard van der Hoff
55d8f56f98
update docs
2016-03-17 17:53:20 +00:00
Richard van der Hoff
ab35fff9e8
Implement 'pendingEventList'
...
The existing 'pendingEventOrdering'=='end' semantics had been substantially
broken by the introduction of timelines and gappy syncs: after a gappy
sync, pending events would get stuck in the old timeline section. (Part of
https://github.com/vector-im/vector-web/issues/1120 ).
2016-03-17 17:05:23 +00:00
Richard van der Hoff
3c6bd4774d
Refactor transmitted-messages code
...
This is some preparatory work for fixing up the problems with te timeline
ordering of unsent messages
(https://github.com/vector-im/vector-web/issues/1120 ). The functional changes
here should be minimal (bar an extra `Room.localEchoUpdated` when the local
echo is first added to the timeline).
Give `MatrixClient.sendEvent` its own entry point `Room.addPendingMessage`
instead of pushing it through `addEventsToTimeline`; this considerably
simplifies the implementation of the latter and also means that we can contain
the `_txnId` ming to MatrixClient.
Move the code which deals with a successful `/send` response from
`MatrixClient` into `Room.updatePendingEvent`, since it involves fiddling with
the innards of the Room.
Also adds a new EventStatus 'SENT' for events which have been successfully sent
but whose remote echo we still haven't received.
2016-03-17 14:26:36 +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
ebc95667b8
workaround for unicode regexp matches - https://github.com/vector-im/vector-web/issues/568
2016-03-17 01:02:50 +00:00
Matthew Hodgson
f7bc11361c
trivially add content.currently_active in m.presence events.
2016-03-16 22:35:55 +00:00
Matthew Hodgson
a68b61dafe
oops, revert accidental merge
2016-03-16 17:33:30 +00:00
Matthew Hodgson
84c9876b3a
if synapse handed us profile data in the leave event, then use it. unbreaks overzealous tests
2016-03-16 17:32:47 +00:00
Matthew Hodgson
de864c489a
make sure we show display names & avatars on parts, and use the right type of content for displaynames for member events in general. fixes https://github.com/vector-im/vector-web/issues/1140 and https://github.com/vector-im/vector-web/issues/873 and a bunch more
2016-03-16 17:32:47 +00:00
Matthew Hodgson
2c277f7d96
Merge pull request #108 from matrix-org/matthew/fix-displaynames
...
Matthew/fix displaynames
2016-03-16 17:31:41 +00:00
Kegan Dougal
d0560f594d
Set the right .sender value for m.room.member events
2016-03-16 17:18:33 +00:00
Matthew Hodgson
3d316959f9
Revert this as it just doesn't work - our events are always m.room.members at this point
2016-03-16 16:44:22 +00:00
Matthew Hodgson
f35409700a
Revert "make sure we show display names & avatars on parts, and use the right…"
2016-03-16 14:49:29 +00:00
Matthew Hodgson
b009739b9e
Merge pull request #106 from matrix-org/matthew/fix-displaynames
...
make sure we show display names & avatars on parts, and use the right…
2016-03-16 14:39:59 +00:00
Matthew Hodgson
3db4d9488b
oops, normal events should use the chronologically earlier content, but membership changes should use the current content.
2016-03-16 14:31:03 +00:00
Matthew Hodgson
6b0fa84697
if synapse handed us profile data in the leave event, then use it. unbreaks overzealous tests
2016-03-16 14:14:14 +00:00
Matthew Hodgson
98b0cf2560
make sure we show display names & avatars on parts, and use the right type of content for displaynames for member events in general. fixes https://github.com/vector-im/vector-web/issues/1140 and https://github.com/vector-im/vector-web/issues/873 and a bunch more
2016-03-16 13:51:55 +00:00
Matthew Hodgson
372759b6e4
fix lint
2016-03-16 13:43:38 +00:00