matrix-org/synapse — pull request #11 by Kegsay (2014-11-04 13:17:49+00:00)
Title: Webclient room data restructure

This completely modifies the way data is stored and passed around in the web client.

Previously, data was primarily transmitted via ``$rootScope.events.rooms`` and raw events would be dumped in. This limited the amount of processing you could do (particularly wrt old and current room state). Furthermore, the old data structure did not follow the new SDK architecture previously discussed.

This new architecture introduces concepts like ``RoomState`` and a ``modelService`` which provides access to the underlying rooms data. There is still additional work to be done (e.g. ``User`` objects) but the previous implementation was modular enough for me to leave ``$rootScope.presence`` alone.

Most of the changes are just in-line copy/paste replacements, but some include additional logic for getting the right ``RoomState`` for a given event, as well as general cleanup/code hygiene.