Notifications: Temporarily turn off sound for reactions (#1808)
This commit is contained in:
parent
5b7bda0931
commit
e54bf92a1f
@ -137,6 +137,7 @@ addActionHandler('apiUpdate', (global, actions, update) => {
|
||||
notifyAboutMessage({
|
||||
chat,
|
||||
message,
|
||||
isReaction: true,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -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),
|
||||
]);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user