Improved PUSH notifications

Closes #1593
This commit is contained in:
Igor Zhukov 2018-01-10 16:48:03 +04:00
parent 98c5f40308
commit 2a86521dae

View File

@ -57,7 +57,9 @@ self.addEventListener('push', function(event) {
if (userInvisibleIsSupported() || hasActiveWindows) {
return closeAllNotifications()
}
var promise = self.registration.showNotification('Telegram').then(function () {
return self.registration.showNotification('Telegram', {
tag: 'unknown_peer'
}).then(function () {
if (hasActiveWindows) {
return closeAllNotifications()
}