summary refs log tree commit diff
path: root/webclient/room
diff options
context:
space:
mode:
authorEmmanuel ROHEE <erohee@amdocs.com>2014-09-11 11:53:37 +0200
committerEmmanuel ROHEE <erohee@amdocs.com>2014-09-11 11:53:37 +0200
commit14a9652324a1dbfec55b83ae4fbfb7ee3bf1f3da (patch)
tree0ab18e9b8fceedd1f21760af74888b8348fa8f7d /webclient/room
parentBF: made input autofocus work when opening the room topic input (diff)
downloadsynapse-14a9652324a1dbfec55b83ae4fbfb7ee3bf1f3da.tar.xz
Room topic: if the request fails, show the error in the feedback
Diffstat (limited to 'webclient/room')
-rw-r--r--webclient/room/room-controller.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/webclient/room/room-controller.js b/webclient/room/room-controller.js
index 94c7688907..fe3821eb45 100644
--- a/webclient/room/room-controller.js
+++ b/webclient/room/room-controller.js
@@ -67,7 +67,14 @@ angular.module('RoomController', ['ngSanitize', 'matrixFilter', 'mFileInput'])
         },
         updateTopic: function() {
             console.log("Updating topic to "+$scope.topic.newTopicText);
-            matrixService.setTopic($scope.room_id, $scope.topic.newTopicText);
+            matrixService.setTopic($scope.room_id, $scope.topic.newTopicText).then(
+                function() {
+                },
+                function(error) {
+                    $scope.feedback = "Request failed: " + error.data.error;
+                }
+            );
+
             $scope.topic.isEditing = false;
         },
         cancelEdit: function() {