summary refs log tree commit diff
path: root/webclient/components
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@matrix.org>2014-09-23 20:00:56 +0100
committerMatthew Hodgson <matthew@matrix.org>2014-09-23 20:01:32 +0100
commitcbea225d97115d76a909ea1c6fb1455fa29948e6 (patch)
tree0066b9603a2441ab9fab7c892eeca9b8f81ddd2e /webclient/components
parentBugfix for older Pythons that lack hmac.compare_digest() (diff)
downloadsynapse-cbea225d97115d76a909ea1c6fb1455fa29948e6.tar.xz
manu: what's going on here?
Diffstat (limited to 'webclient/components')
-rw-r--r--webclient/components/matrix/event-handler-service.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/webclient/components/matrix/event-handler-service.js b/webclient/components/matrix/event-handler-service.js
index 9c19f306c0..ae753b3e04 100644
--- a/webclient/components/matrix/event-handler-service.js
+++ b/webclient/components/matrix/event-handler-service.js
@@ -101,7 +101,7 @@ function(matrixService, $rootScope, $q, $timeout, mPresence) {
 
     var initRoom = function(room_id, room) {
         if (!(room_id in $rootScope.events.rooms)) {
-            console.log("Creating new handler entry for " + room_id);
+            console.log("Creating new rooms entry for " + room_id);
             $rootScope.events.rooms[room_id] = {
                 room_id: room_id,
                 messages: [],
@@ -113,10 +113,11 @@ function(matrixService, $rootScope, $q, $timeout, mPresence) {
             };
         }
 
-        if (room) {
+        if (room) { // we got an existing room object from initialsync, seemingly.
             // Report all other metadata of the room object (membership, inviter, visibility, ...)
+            // XXX: do we *REALLY* want to iterate over *EVERY* field in the object, including all its methods etc? -- Matthew
             for (var field in room) {
-                if (-1 === ["room_id", "messages", "state"].indexOf(field)) {
+                if (-1 === ["room_id", "messages", "state"].indexOf(field)) { // why indexOf - why not ===? --Matthew
                     $rootScope.events.rooms[room_id][field] = room[field];
                 }
             }