diff --git a/webclient/app-controller.js b/webclient/app-controller.js index 0e823b43e..7d6120755 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() { diff --git a/webclient/recents/recents.html b/webclient/recents/recents.html index edfc1677e..ff811b2b8 100644 --- a/webclient/recents/recents.html +++ b/webclient/recents/recents.html @@ -2,7 +2,7 @@
@@ -19,6 +19,8 @@ {{ lastMsg = eventHandlerService.getLastMessage(room.room_id, true);"" }} {{ (lastMsg.ts) | date:'MMM d HH:mm' }} + + |