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

14 Commits

Author SHA1 Message Date
Kegan Dougal
90e778cb84 Handle redactions (both live and historic). 2015-07-21 17:14:11 +01:00
Kegan Dougal
0be3c6837d Add utils UTs. Remove unused functions. 2015-06-24 17:42:02 +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
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
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
2fb68cfed2 Handle m.typing events. 2015-06-09 10:27:37 +01:00
Kegan Dougal
a43447b00e Add tests to exercise room name / timeline logic; fix some bugs as a result. 2015-06-08 17:27:10 +01:00
Kegan Dougal
2d00998b61 Move getFriendlyRoomName to Room. Add recalculate() function to cache info. 2015-06-08 16:10:23 +01:00
Kegan Dougal
a2257aeb0b Move getFriendlyDisplayName to RoomMember class. Add more utlity functions. 2015-06-08 12:21:23 +01:00
Kegan Dougal
7ab3e25218 Add @module docs. Remove browser-build.sh
Add @links for HTML output. Replace browser-build.sh with inline commands
in package.json so building will work on non-unix machines. Update README.
2015-06-04 16:34:00 +01:00
Kegan Dougal
31ffdf8a37 Style checks and more jsdoc. 2015-06-04 16:02:08 +01:00
Kegan Dougal
a95f9d3717 Make MatrixHttpApi a generic API interface; move specifics to MatrixClient.
Add a utils file to store common operations like map() and encodeParams().
Modify MatrixClient and MatrixHttpApi to accepts opts as constructors.
2015-06-04 15:39:36 +01:00