Kegan Dougal
756fe4ddcb
Implement MatrixScheduler.
2015-06-19 16:53:28 +01:00
Kegan Dougal
898d16ae76
Update CHANGELOG
2015-06-19 16:07:36 +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
Kegsay
8d77edce86
Formatting
2015-06-18 10:01:13 +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
ee4d66024a
Update changelog
2015-06-15 10:20:54 +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
4316a22913
Bump to 0.1.0 - Generate browser (min) version
v0.1.0
2015-06-12 17:17:39 +01:00
Kegsay
ae9e68d9b2
Add a "what this sdk does" section
2015-06-12 17:12:53 +01:00
Kegsay
9dfb5b72b8
NPM hates RST. Convert README to Markdown.
2015-06-12 16:52:02 +01:00
Kegsay
3dc6bf3647
Update README with example output
2015-06-12 16:33:04 +01:00
Kegan Dougal
7a96637a1b
Example app: Print timestamps and all state events.
2015-06-12 16:26:44 +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
Kegan Dougal
8c5c7cc961
Make examples/node/app an actual app rather than the usage example.
2015-06-12 10:33:45 +01:00
Kegsay
1fed4def69
Merge pull request #8 from matrix-org/event-emitter
...
Event emitter implementation (SYJS-7)
2015-06-11 18:18:54 +01:00
Kegan Dougal
9be3b2757a
Fix formatting.
2015-06-11 17:59:10 +01:00
Kegan Dougal
afee001de7
Add fleshed out example
2015-06-11 17:58:24 +01:00
Kegan Dougal
8aefad221a
Add client.getRooms. Add 'syncComplete' event. Display room invites.
2015-06-11 17:52:52 +01:00
Kegsay
4db752feb3
Add another example
2015-06-11 16:54:02 +01:00
Kegan Dougal
61f107f6f9
Hide the data store from the end-user. Proxy calls to getRoom.
2015-06-11 16:36:30 +01:00
Kegan Dougal
8e45d6b625
Bug fixes on initialSync and RoomMember.userId.
...
Don't assume that .state and .messages exist in /initialSync results.
Use state_key and not user_id when setting the userId of a RoomMember.
2015-06-11 16:29:36 +01:00
Kegsay
13bb1b2ebf
Add some examples
2015-06-11 16:27:51 +01:00
Kegsay
fee15ce50f
Mention v2 alpha
2015-06-11 15:55:09 +01:00
Kegsay
d6cfcfbf6c
Add syntax highlighting; Add conventions section.
...
Add link to gh-pages for hosted API docs (doesn't exist yet)
2015-06-11 15:41:04 +01:00
Kegan Dougal
19a5b99dea
Add RoomMember and RoomState event emissions with UTs. Hook everything up.
...
Distinguish between inserts and updates to the members dictionary to allow
listeners to add more hooks to the member before it has been given state.
2015-06-11 14:29:32 +01:00
Kegan Dougal
911ca1d5c5
Implement Room event emissions with UTs.
...
Shuffle test groupings into EventEmitter and startClient. Add more jsdoc.
2015-06-11 13:22:21 +01:00
Kegan Dougal
4c3e56ad4c
Add test for event emitting. Fix reEmit function.
2015-06-11 11:58:31 +01:00
Kegan Dougal
eaa02cd2ad
Add utils.inherits. Make User inherit EventEmitter.
...
utils.inherits is the Node.js impl but with the addition of a polyfill for
Object.create().
2015-06-11 11:37:43 +01:00
Kegan Dougal
c737068fe7
Don't fire events in the constructor; you can't listen for them.
2015-06-11 11:12:31 +01:00
Kegan Dougal
07f77c495b
Move event jsdoc to respective classes. Document which functions fire.
...
This tends to boil down into a setXEvent method which can fire if it updates
the model.
2015-06-11 10:54:25 +01:00
Kegan Dougal
8a21e05f56
Specify the right key name when replacing index.js for browserify.
2015-06-10 17:48:06 +01:00
Kegan Dougal
58cbd3ab1b
Move RoomMember event jsdocs to the room-member module.
2015-06-10 17:25:34 +01:00
Kegan Dougal
fc2c6f403d
Re-add power-level/typing UTs as RoomMember tests.
2015-06-10 17:19:56 +01:00