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

30 Commits

Author SHA1 Message Date
Kegan Dougal
358cdaf167 Fix linting errors 2015-07-21 17:20:35 +01:00
Kegan Dougal
90e778cb84 Handle redactions (both live and historic). 2015-07-21 17:14:11 +01:00
Kegan Dougal
6653d294d9 Re-apply metadata after setStateEvents to correctly apply sender/target props for m.room.member events. 2015-07-21 16:58:14 +01:00
Erik Johnston
f716431f65 Make getJoinedUsers call getMembersWithMembership 2015-07-21 15:41:33 +01:00
Erik Johnston
86e73bdd35 Add getMembersWithMembership to get all members with given membership state 2015-07-21 15:31:58 +01:00
Matthew Hodgson
3a344a0138 turn off alias disambiguation, and add a method to grab room avatar urls 2015-07-15 03:53:51 +01:00
Kegan Dougal
8cb973e605 Fix SYJS-16: event.sender is sometimes null for locally sent events. 2015-07-14 12:00:19 +01:00
Matthew Hodgson
f75453d5d5 ignore parted users when naming rooms 2015-07-08 14:55:08 +01:00
Kegan Dougal
82de3b6f19 Begin scrollback implementation.
Add Room.storageToken to docs. Add unit test stubs for scrollback function.
Add a basic common-case implementation.
2015-07-01 18:04:59 +01:00
Kegan Dougal
fd0eb0c674 Finish timline integration tests. 2015-06-26 13:53:01 +01:00
Kegan Dougal
21df000604 Add Room.addEvents UT 2015-06-25 14:00:52 +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
8e6eb35dfe Implement local echo.
Mark events being sent via the status property. Update CHANGELOG.
2015-06-17 17:42:12 +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
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
8aefad221a Add client.getRooms. Add 'syncComplete' event. Display room invites. 2015-06-11 17:52:52 +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
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
f9f8816b7d Return '?' instead of 'Unknown' for rooms which names cannot be calculated.
This makes it easier to localise in the future (if name == '?'), whilst
still indicating an unknown name. Ideally we would be returning null, but
this would require null checks every time the room name was accessed, which
isn't ideal. This also makes the UT for this less brittle (rather than
comparing literal english strings which are prone to breakage when we
inevitably change 'Unknown' to 'unknown' or something else.
2015-06-10 09:44:53 +01:00
Kegan Dougal
4ff6ecd58c Add room name UTs and add self-chat room name. 2015-06-09 17:05:56 +01:00
Kegan Dougal
f086bcca4c Add User class. Convert store to store/get User objects. 2015-06-09 10:55:26 +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
9fa7fa0487 Shuffle around how events are stored.
Rather than having MatrixInMemoryStore do it all, we make the right object do
the right thing, and keep the store for storing said objects.
2015-06-08 15:43:18 +01:00
Kegan Dougal
7ce3a781f3 Add Room, RoomState and RoomMember classes. 2015-06-08 11:47:15 +01:00
Kegan Dougal
d1e51de7ec Split out matrix.js into different files. Glue things back.
Added a models directory. Added store, http-api and client files. Slowly
transitioning to the architecture outlined in SYJS-5.
2015-06-03 17:55:12 +01:00