summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--webclient/app-controller.js2
-rw-r--r--webclient/components/matrix/event-handler-service.js6
2 files changed, 7 insertions, 1 deletions
diff --git a/webclient/app-controller.js b/webclient/app-controller.js
index 7d61207554..e4b7cd286f 100644
--- a/webclient/app-controller.js
+++ b/webclient/app-controller.js
@@ -53,7 +53,7 @@ angular.module('MatrixWebClientController', ['matrixService', 'mPresence', 'even
      * Open a given page.
      * @param {String} url url of the page
      */
-    $scope.goToPage = function(url) {
+    $rootScope.goToPage = function(url) {
         $location.url(url);
     };
     
diff --git a/webclient/components/matrix/event-handler-service.js b/webclient/components/matrix/event-handler-service.js
index b1580b3d8a..d9e1fe31ce 100644
--- a/webclient/components/matrix/event-handler-service.js
+++ b/webclient/components/matrix/event-handler-service.js
@@ -238,6 +238,12 @@ function(matrixService, $rootScope, $q, $timeout, mPresence) {
                         "body": message,
                         "icon": member ? member.avatar_url : undefined
                     });
+
+                    notification.onclick = function() {
+                        console.log("notification.onclick() room=" + event.room_id);
+                        $rootScope.goToPage('room/' + (event.room_id)); 
+                    };
+
                     $timeout(function() {
                         notification.close();
                     }, 5 * 1000);