mirror of
https://github.com/element-hq/synapse
synced 2024-09-04 12:30:06 +00:00
Implement SYWEB-58: Clicking a notification now takes you to that room.
This commit is contained in:
parent
2a44558fbd
commit
ed241ba032
2 changed files with 7 additions and 1 deletions
|
@ -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) {
|
||||||
"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);
|
||||||
|
|
Loading…
Reference in a new issue