diff --git a/src/vector/platform/ElectronPlatform.tsx b/src/vector/platform/ElectronPlatform.tsx index 7932c6433d..510acd6f43 100644 --- a/src/vector/platform/ElectronPlatform.tsx +++ b/src/vector/platform/ElectronPlatform.tsx @@ -335,8 +335,8 @@ export default class ElectronPlatform extends VectorBasePlatform { return true; } - maySendNotifications(): boolean { - return true; + async maySendNotifications(): Promise { + return this._ipcCall('getMaySendNotifications'); } 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 2e739a2660..35ec637f92 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. */ - maySendNotifications(): boolean { + async maySendNotifications(): Promise { return window.Notification.permission === 'granted'; }