Skip to content
Snippets Groups Projects
Commit ed241ba0 authored by Kegan Dougal's avatar Kegan Dougal
Browse files

Implement SYWEB-58: Clicking a notification now takes you to that room.

parent 2a44558f
No related branches found
No related tags found
No related merge requests found
...@@ -53,7 +53,7 @@ angular.module('MatrixWebClientController', ['matrixService', 'mPresence', 'even ...@@ -53,7 +53,7 @@ angular.module('MatrixWebClientController', ['matrixService', 'mPresence', 'even
* Open a given page. * Open a given page.
* @param {String} url url of the page * @param {String} url url of the page
*/ */
$scope.goToPage = function(url) { $rootScope.goToPage = function(url) {
$location.url(url); $location.url(url);
}; };
......
...@@ -238,6 +238,12 @@ function(matrixService, $rootScope, $q, $timeout, mPresence) { ...@@ -238,6 +238,12 @@ function(matrixService, $rootScope, $q, $timeout, mPresence) {
"body": message, "body": message,
"icon": member ? member.avatar_url : undefined "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() { $timeout(function() {
notification.close(); notification.close();
}, 5 * 1000); }, 5 * 1000);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment