Merge pull request #5102 from matrix-org/t3chguy/14938

Try to close notification on all platforms which support it, not just electron
This commit is contained in:
Michael Telatynski 2020-08-12 16:02:02 +01:00 committed by GitHub
commit b990a0dd3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -155,7 +155,13 @@ export default abstract class BasePlatform {
loudNotification(ev: Event, room: Object) {
}
clearNotification(notif: Notification) {
// Some browsers don't support this, e.g Safari on iOS
// https://developer.mozilla.org/en-US/docs/Web/API/Notification/close
if (notif.close) {
notif.close();
}
}
/**