mirror of https://github.com/vector-im/riot-web
Implement maySendNotifications based upon dnd work
parent
48b994d87c
commit
8bb98c3044
|
@ -335,8 +335,8 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
|||
return true;
|
||||
}
|
||||
|
||||
maySendNotifications(): boolean {
|
||||
return true;
|
||||
async maySendNotifications(): Promise<boolean> {
|
||||
return this._ipcCall('getMaySendNotifications');
|
||||
}
|
||||
|
||||
displayNotification(title: string, msg: string, avatarUrl: string, room: Room): Notification {
|
||||
|
|
|
@ -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<boolean> {
|
||||
return window.Notification.permission === 'granted';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue