diff --git a/src/global/actions/apiUpdaters/chats.ts b/src/global/actions/apiUpdaters/chats.ts index 37f312f9f..634d9fe15 100644 --- a/src/global/actions/apiUpdaters/chats.ts +++ b/src/global/actions/apiUpdaters/chats.ts @@ -137,6 +137,7 @@ addActionHandler('apiUpdate', (global, actions, update) => { notifyAboutMessage({ chat, message, + isReaction: true, }); } diff --git a/src/serviceWorker/pushNotification.ts b/src/serviceWorker/pushNotification.ts index d68ff43d4..686d01f87 100644 --- a/src/serviceWorker/pushNotification.ts +++ b/src/serviceWorker/pushNotification.ts @@ -129,7 +129,8 @@ function showNotification({ }; return Promise.all([ - playNotificationSound(String(messageId) || chatId || ''), + // TODO Remove condition when reaction badges are implemented + !reaction ? playNotificationSound(String(messageId) || chatId || '') : undefined, self.registration.showNotification(title, options), ]); } diff --git a/src/util/notifications.ts b/src/util/notifications.ts index 63f607da6..0145ae0ef 100644 --- a/src/util/notifications.ts +++ b/src/util/notifications.ts @@ -409,6 +409,8 @@ export async function notifyAboutMessage({ // Play sound when notification is displayed notification.onshow = () => { + // TODO Remove when reaction badges are implemented + if (isReaction) return; playNotifySoundDebounced(String(message.id) || chat.id); }; }