David Baker
21150e7587
Doc fail
2015-06-26 16:50:55 +01:00
David Baker
3806c4d566
Missing semicolon
2015-06-26 16:49:07 +01:00
David Baker
b814872c37
unnecessary semicolon
2015-06-26 16:45:59 +01:00
David Baker
b2656024bd
Merge branch 'develop' into push
...
Conflicts:
lib/client.js
2015-06-26 16:39:32 +01:00
Kegan Dougal
b7975866fa
Add getSyncToken and setSyncToken to data store interface.
...
This allows local storage to hold onto the token across page refreshes.
2015-06-26 15:36:53 +01:00
Kegan Dougal
6078100465
Export LocalStorageStore class. Throw if 'localStorage' isn't defined.
2015-06-26 15:24:55 +01:00
Kegan Dougal
a3a59f4456
Add localstorage store module.
2015-06-26 15:13:04 +01:00
David Baker
9ea080b7bb
Fetch the user's push rules before any events arrive, so we can annotate events with push data when they arrive.
2015-06-26 15:11:27 +01:00
Kegan Dougal
fd0eb0c674
Finish timline integration tests.
2015-06-26 13:53:01 +01:00
Kegan Dougal
3c4bda8580
Add MatrixScheduler.removeEventFromQueue/getQueueForEvent and QUEUED state.
...
This is to allow the UI to show "queued" on events as well as allow the
removal of events in the queue.
2015-06-26 09:52:52 +01:00
Kegan Dougal
320bbec737
Add MatrixScheduler.getQueue to allow items in the queue to be modified.
2015-06-25 18:00:07 +01:00
Kegan Dougal
f49234a772
Add pagination tests
2015-06-25 17:29:25 +01:00
Kegan Dougal
46d5c2bd61
Add pagination test; fix null token bug.
2015-06-25 16:33:22 +01:00
Kegan Dougal
325c00c660
Set Room.oldState.paginationToken to null at the start of the timeline. Fix linting errors.
2015-06-25 15:28:25 +01:00
Kegan Dougal
21df000604
Add Room.addEvents UT
2015-06-25 14:00:52 +01:00
Kegan Dougal
0be3c6837d
Add utils UTs. Remove unused functions.
2015-06-24 17:42:02 +01:00
Kegan Dougal
1b665c176a
Add RoomState UTs
2015-06-24 14:57:04 +01:00
Kegan Dougal
d3377e3dea
Add RoomMember UTs. Fix disambiguation bug. Add CHANGELOG.
2015-06-24 13:35:19 +01:00
Kegan Dougal
07d3f43d8b
Refactor terminal app; add /invite and /roominfo.
2015-06-23 15:22:57 +01:00
Kegan Dougal
57914969b8
Add MatrixClient.resendEvent to manually resend an event that was not sent.
...
Bundle txnId as MatrixEvent._txnId instead of exposing it to every place that
happens to need it (since it's so tightly coupled with MatrixEvent)
2015-06-23 14:08:02 +01:00
Kegan Dougal
378c7fd6cb
Update docs
2015-06-23 12:15:41 +01:00
Kegan Dougal
7534f59af2
Hook up the callback fn for scrollback. Update CHANGELOG.
2015-06-23 12:04:43 +01:00
Kegan Dougal
6737388766
Implement pagination via the scrollback() function. Update CHANGELOG.
2015-06-23 11:36:30 +01:00
Kegan Dougal
b7ed78b432
Update CHANGELOG. Add StubStore.
...
Default to a no-op store class to prevent having to constantly check for
MatrixClient.store and other defensive checks which clutters the intent
of the code.
2015-06-23 11:03:08 +01:00
Kegan Dougal
9c2a2902eb
Fix bug where hibernating laptops fail to restart the event stream.
...
On some devices, the act of hibernating black holes the request so the
success/failure callbacks never fire. This prevents a re-poll as that is done
in the callbacks. To fix this, we add a local timer which, when it fires,
will forcibly do a re-poll. The local timer has a timeout value several
seconds more than the timeout= value (which should've returned by then).
2015-06-23 10:40:53 +01:00
Kegan Dougal
ef77c6f989
Sync room state when another device joins a room.
2015-06-23 10:18:13 +01:00
Kegan Dougal
bc0e2ad504
Sync room state when joining via client.joinRoom
...
Does not currently sync state when another device joins.
Update node example app to refresh room list.
2015-06-22 17:50:49 +01:00
Kegan Dougal
ad70b3d434
Don't set NOT_SENT in the scheduler; the MatrixClient is responsible for this.
2015-06-19 17:19:48 +01:00
Kegan Dougal
756fe4ddcb
Implement MatrixScheduler.
2015-06-19 16:53:28 +01:00
Kegan Dougal
18db0d8c02
Emit 'Room' event when the Room is fully populated rather than newly created.
2015-06-19 16:05:13 +01:00
Kegan Dougal
2f78ceb6fc
Design the API for the scheduler and hook MatrixClient up to it.
...
Scheduler itself still needs internal impl.
2015-06-19 15:50:05 +01:00
Kegan Dougal
8a9f84a4b2
Don't return something which doesn't exist.
2015-06-18 17:49:13 +01:00
Kegan Dougal
1e3162128a
Shelve scheduler queue work. Add processFn.
2015-06-18 13:56:46 +01:00
Kegan Dougal
7e12ea4273
Start gluing MatrixClient and MatrixScheduler.
2015-06-18 12:07:18 +01:00
Kegan Dougal
18a3ce415c
Add _queues to MatrixScheduler.
2015-06-18 11:49:34 +01:00
Kegan Dougal
ca414d1611
Implement rate limiting in the default retry algorithm.
2015-06-18 11:28:17 +01:00
Kegan Dougal
ba56f5f621
Implement MatrixScheduler.
...
Formed of two parts: the retry and queuing functions. Use sensible defaults.
2015-06-18 11:11:07 +01:00
Kegan Dougal
4810d04257
Add stub MatrixScheduler.
2015-06-18 10:07:44 +01:00
Kegan Dougal
9cb37fbe4f
Actually allow MatrixClient to not have a store. Update jsdoc.
2015-06-18 09:59:02 +01:00
Kegan Dougal
d151ac49f2
Mark events which fail to send.
2015-06-18 09:32:04 +01:00
Kegan Dougal
d74a71cc2d
linting and update README.
2015-06-17 17:47:57 +01:00
Kegan Dougal
8e6eb35dfe
Implement local echo.
...
Mark events being sent via the status property. Update CHANGELOG.
2015-06-17 17:42:12 +01:00
Kegan Dougal
f77e8e3bf7
Add User.events.presence property for storing the m.presence event for a user.
2015-06-15 10:20:04 +01:00
Kegan Dougal
94931cdc07
Remove broken function; add RoomMember.events.member property.
2015-06-15 09:49:54 +01:00
Kegan Dougal
c6b11fc382
Make Room.calculateRoomName private to avoid confusion with Room.name.
2015-06-15 09:31:46 +01:00
Kegan Dougal
7a02c5d167
Add concept of 'sentinel' RoomMembers which watch state at a particular point in time.
...
New sentinels are only created when the RoomMember state changes, so we don't
needlessly deep copy RoomMembers f.e. MatrixEvent. Sentinels co-exist with
RoomState.members which are single instances to which listeners can be attached.
This gets the best of both worlds (don't have to keep re-attaching listeners on
member changes, don't have needless memory consumption).
2015-06-12 15:38:02 +01:00
Kegan Dougal
8a844d59ec
Get historical display names working on messages.
...
Accessed via MatrixEvent.sender property. Deep copy the list of state events
from initial sync for old/current RoomState so updating the .sender property
doesn't affect both of them. Reverse the insertion of initial sync MatrixEvents
so state diverges to *earlier* points in time. Add a 'forwardLooking' property
to MatrixEvent to determine which out of 'content' and 'prev_content' entities
should take into account e.g. when determining display names. Finally, always
create new RoomMembers when they are updated in order to prevent corrupting
(read: sharing the same member object) the MatrixEvent.sender property of
existing events in the timeline.
2015-06-12 14:21:24 +01:00
Kegan Dougal
3061b95afe
Add getPrevContent function and mark it's situational presence.
2015-06-12 11:26:33 +01:00
Kegan Dougal
71dacb14b1
Add MatrixEvent.sender and .target to pull the right name per message.
2015-06-12 11:05:57 +01:00
Kegan Dougal
da7b31cb7e
Add Room.getJoinedMembers helper. UX tweaks to example.
2015-06-12 10:49:13 +01:00