mirror of
https://github.com/danog/telegram-tt.git
synced 2025-01-22 05:11:55 +01:00
Notifications: Fix missing sound when notifications are not permitted (#1555)
This commit is contained in:
parent
50db2eea77
commit
a23e951b09
@ -322,12 +322,13 @@ export async function notifyAboutNewMessage({
|
||||
}: { chat: ApiChat; message: Partial<ApiMessage> }) {
|
||||
const { hasWebNotifications } = await loadNotificationSettings();
|
||||
if (!checkIfShouldNotify(chat)) return;
|
||||
if (!hasWebNotifications) {
|
||||
const areNotificationsSupported = checkIfNotificationsSupported();
|
||||
if (!hasWebNotifications || !areNotificationsSupported) {
|
||||
// only play sound if web notifications are disabled
|
||||
playNotifySoundDebounced(String(message.id) || chat.id);
|
||||
return;
|
||||
}
|
||||
if (!checkIfNotificationsSupported()) return;
|
||||
if (!areNotificationsSupported) return;
|
||||
if (!message.id) return;
|
||||
|
||||
const {
|
||||
|
Loading…
x
Reference in New Issue
Block a user