Seperate sending of notifs from sounds

hs/dnd
Will Hunt 2020-09-29 17:05:37 +01:00
parent 8bb98c3044
commit ebcf9dd68e
2 changed files with 7 additions and 3 deletions

View File

@ -335,8 +335,12 @@ export default class ElectronPlatform extends VectorBasePlatform {
return true;
}
async maySendNotifications(): Promise<boolean> {
return this._ipcCall('getMaySendNotifications');
maySendNotifications(): boolean {
return true;
}
async isDoNotDisturbEnabled(): Promise<boolean> {
return this._ipcCall('getDoNotDisturbEnabled');
}
displayNotification(title: string, msg: string, avatarUrl: string, room: Room): Notification {

View File

@ -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<boolean> {
maySendNotifications(): boolean {
return window.Notification.permission === 'granted';
}