i'm using this code to push notification to my user:
Notification.requestPermission(function(result) {
if (result === 'granted') {
navigator.serviceWorker.ready
.then(function(registration) {
registration
.showNotification('new message from ' + message.user, {
body: message.message,
vibrate: [200, 100, 200, 100, 200, 100, 200],
tag: 'message'
});
})
;
}else {
alert('new message from ' + message.user + '\n please allow notification to get notification when a message receive.')
}
});
how to redirect user to specific url after click on notification?