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.
Этот коммит содержится в:
Yuya Ochiai
2016-10-12 22:36:06 +09:00
коммит произвёл Harrison Healey
родитель 552508706d
Коммит 0a2146692c
3 изменённых файлов: 21 добавлений и 5 удалений

Просмотреть файл

@@ -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) {