PLT-4261 Set silent parameter for Notification (#4192)
In the desktop app, there are two kinds of sound on notifications, `Utils.ding()` and `new Notification()` on Windows and Mac. This commit stops both if the account setting is set to off.
Этот коммит содержится в:
коммит произвёл
Harrison Healey
родитель
552508706d
Коммит
0a2146692c
@@ -86,7 +86,7 @@ export function getCookie(name) {
|
||||
|
||||
var requestedNotificationPermission = false;
|
||||
|
||||
export function notifyMe(title, body, channel, teamId, duration) {
|
||||
export function notifyMe(title, body, channel, teamId, duration, silent) {
|
||||
if (!('Notification' in window)) {
|
||||
return;
|
||||
}
|
||||
@@ -102,7 +102,7 @@ export function notifyMe(title, body, channel, teamId, duration) {
|
||||
Notification.requestPermission((permission) => {
|
||||
if (permission === 'granted') {
|
||||
try {
|
||||
var notification = new Notification(title, {body, tag: body, icon: icon50, requireInteraction: notificationDuration === 0});
|
||||
var notification = new Notification(title, {body, tag: body, icon: icon50, requireInteraction: notificationDuration === 0, silent});
|
||||
notification.onclick = () => {
|
||||
window.focus();
|
||||
if (channel) {
|
||||
|
||||
Ссылка в новой задаче
Block a user