diff --git a/src/vector/platform/ElectronPlatform.tsx b/src/vector/platform/ElectronPlatform.tsx index 510acd6f43..5c953b2f59 100644 --- a/src/vector/platform/ElectronPlatform.tsx +++ b/src/vector/platform/ElectronPlatform.tsx @@ -335,8 +335,12 @@ export default class ElectronPlatform extends VectorBasePlatform { return true; } - async maySendNotifications(): Promise { - return this._ipcCall('getMaySendNotifications'); + maySendNotifications(): boolean { + return true; + } + + async isDoNotDisturbEnabled(): Promise { + return this._ipcCall('getDoNotDisturbEnabled'); } displayNotification(title: string, msg: string, avatarUrl: string, room: Room): Notification { diff --git a/src/vector/platform/WebPlatform.ts b/src/vector/platform/WebPlatform.ts index 35ec637f92..2e739a2660 100644 --- a/src/vector/platform/WebPlatform.ts +++ b/src/vector/platform/WebPlatform.ts @@ -50,7 +50,7 @@ export default class WebPlatform extends VectorBasePlatform { * Returns true if the application currently has permission * to display notifications. Otherwise false. */ - async maySendNotifications(): Promise { + maySendNotifications(): boolean { return window.Notification.permission === 'granted'; }