forked from Mirrors/gomuks
web/main: add ios safari compatibility
This commit is contained in:
parent
2e5c2fdd6c
commit
714aa477b7
2 changed files with 2 additions and 2 deletions
|
@ -66,7 +66,7 @@ export default class Client {
|
||||||
}
|
}
|
||||||
console.log("Successfully authenticated, connecting to websocket")
|
console.log("Successfully authenticated, connecting to websocket")
|
||||||
this.rpc.start()
|
this.rpc.start()
|
||||||
Notification.requestPermission()
|
window.Notification?.requestPermission()
|
||||||
.then(permission => console.log("Notification permission:", permission))
|
.then(permission => console.log("Notification permission:", permission))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -180,7 +180,7 @@ export class StateStore {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Notification.permission === "granted" && !focused.current) {
|
if (window.Notification?.permission === "granted" && !focused.current) {
|
||||||
for (const notification of data.notifications) {
|
for (const notification of data.notifications) {
|
||||||
this.showNotification(room, notification.event_rowid, notification.sound)
|
this.showNotification(room, notification.event_rowid, notification.sound)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue