summary refs log tree commit diff
path: root/webclient/room/room-controller.js
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-08-14 10:01:04 +0100
committerErik Johnston <erik@matrix.org>2014-08-14 10:01:04 +0100
commit10294b60824347d73b01f7ce4add18467d1e6f0c (patch)
tree06d04a0a2e0ccf183bfc602ce9694d5958ed7a2e /webclient/room/room-controller.js
parentMake feedback table also store sender. (diff)
parentgrammar fix (diff)
downloadsynapse-10294b60824347d73b01f7ce4add18467d1e6f0c.tar.xz
Merge branch 'master' of github.com:matrix-org/synapse into sql_refactor
Conflicts:
	synapse/storage/_base.py
Diffstat (limited to 'webclient/room/room-controller.js')
-rw-r--r--webclient/room/room-controller.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/webclient/room/room-controller.js b/webclient/room/room-controller.js
index 5d1c65641e..470f41521a 100644
--- a/webclient/room/room-controller.js
+++ b/webclient/room/room-controller.js
@@ -42,6 +42,8 @@ angular.module('RoomController', [])
                 console.log("Got response from "+$scope.state.events_from+" to "+response.data.end);
                 $scope.state.events_from = response.data.end;
 
+                $scope.feedback = "";
+
                 for (var i = 0; i < response.data.chunk.length; i++) {
                     var chunk = response.data.chunk[i];
                     if (chunk.room_id == $scope.room_id && chunk.type == "m.room.message") {
@@ -68,12 +70,17 @@ angular.module('RoomController', [])
                     $timeout(shortPoll, 0);
                 }
             }, function(response) {
-                $scope.feedback = "Can't stream: " + JSON.stringify(response);
+                $scope.feedback = "Can't stream: " + response.data;
+
+                if (response.status == 403) {
+                    $scope.stopPoll = true;
+                }
+                
                 if ($scope.stopPoll) {
                     console.log("Stopping polling.");
                 }
                 else {
-                    $timeout(shortPoll, 2000);
+                    $timeout(shortPoll, 5000);
                 }
             });
     };