summary refs log tree commit diff
path: root/webclient/components
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2014-10-29 11:29:26 +0000
committerKegan Dougal <kegan@matrix.org>2014-10-29 11:29:26 +0000
commited241ba032ff21fbf122dddbd23ce54d18a172d5 (patch)
treee4181d72347b1e95e15bcf58ef70a773f699cec2 /webclient/components
parentFix SYWEB-128 : Auto-scroll broken if not exactly at bottom of list. (diff)
downloadsynapse-ed241ba032ff21fbf122dddbd23ce54d18a172d5.tar.xz
Implement SYWEB-58: Clicking a notification now takes you to that room.
Diffstat (limited to 'webclient/components')
-rw-r--r--webclient/components/matrix/event-handler-service.js6
1 files changed, 6 insertions, 0 deletions
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);