Implement maySendNotifications based upon dnd work
This commit is contained in:
parent
48b994d87c
commit
8bb98c3044
2 changed files with 3 additions and 3 deletions
|
@ -335,8 +335,8 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
maySendNotifications(): boolean {
|
async maySendNotifications(): Promise<boolean> {
|
||||||
return true;
|
return this._ipcCall('getMaySendNotifications');
|
||||||
}
|
}
|
||||||
|
|
||||||
displayNotification(title: string, msg: string, avatarUrl: string, room: Room): Notification {
|
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
|
* Returns true if the application currently has permission
|
||||||
* to display notifications. Otherwise false.
|
* to display notifications. Otherwise false.
|
||||||
*/
|
*/
|
||||||
maySendNotifications(): boolean {
|
async maySendNotifications(): Promise<boolean> {
|
||||||
return window.Notification.permission === 'granted';
|
return window.Notification.permission === 'granted';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue