summary refs log tree commit diff
path: root/webclient/app-controller.js
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@matrix.org>2014-09-24 01:12:59 +0100
committerMatthew Hodgson <matthew@matrix.org>2014-09-24 01:12:59 +0100
commit7b8e24a588c394ff5c735b966078fe282dc5b833 (patch)
tree10594c951accf07f1ac7c91889d6334f2f1576c2 /webclient/app-controller.js
parentclose buttons on recents (SYWEB-68) (diff)
downloadsynapse-7b8e24a588c394ff5c735b966078fe282dc5b833.tar.xz
close buttons on recents (SYWEB-68)
Diffstat (limited to 'webclient/app-controller.js')
-rw-r--r--webclient/app-controller.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/webclient/app-controller.js b/webclient/app-controller.js
index 0e823b43e7..7d61207554 100644
--- a/webclient/app-controller.js
+++ b/webclient/app-controller.js
@@ -67,6 +67,16 @@ angular.module('MatrixWebClientController', ['matrixService', 'mPresence', 'even
         }
     };
     
+    $scope.leave = function(room_id) {
+        matrixService.leave(room_id).then(
+            function(response) {
+                console.log("Left room " + room_id);
+            },
+            function(error) {
+                console.log("Failed to leave room " + room_id + ": " + error.data.error);
+            });
+    };
+    
     // Logs the user out 
     $scope.logout = function() {