You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-09-16 04:42:05 +03:00
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).