Commit 76f5ea6a authored by Simen Graaten's avatar Simen Graaten
Browse files

We only care about the one room we want to watch

parent ec8743eb
......@@ -28,8 +28,16 @@ var MatrixBlog = function(settings) {
self.client.initialSync(50, function (err, data) {
self.lastId = data.end;
for (var i in data.rooms[0].messages.chunk) {
self.processChunk(data.rooms[0].messages.chunk[i]);
for (var j in data.rooms) {
if (data.rooms[j].room_id == self.roomId) {
for (var i in data.rooms[j].messages.chunk) {
self.processChunk(data.rooms[0].messages.chunk[i]);
}
}
else {
console.log("Ignoring room id: " + data.rooms[j].room_id);
}
}
for (var i in data.presence) {
self.processPresence(data.presence[i]);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment