mirror of https://github.com/keeweb/keeweb
client.supportsNotifications
parent
de0cf0ce67
commit
a3128e56a3
|
@ -105,6 +105,8 @@ const BrowserExtensionConnector = {
|
|||
// TODO: check the process
|
||||
|
||||
state.active = true;
|
||||
state.supportsNotifications = true; // TODO: = !isSafari
|
||||
|
||||
this.processPendingSocketData(socket);
|
||||
},
|
||||
|
||||
|
@ -299,8 +301,11 @@ const BrowserExtensionConnector = {
|
|||
sendSocketEvent(data) {
|
||||
for (const socket of this.connectedSockets) {
|
||||
const state = this.connectedSocketState.get(socket);
|
||||
if (state?.active) {
|
||||
this.sendSocketResponse(socket, data);
|
||||
if (state?.active && state.notifications) {
|
||||
const client = this.connectedClients.get(state.clientId);
|
||||
if (client?.supportsNotifications) {
|
||||
this.sendSocketResponse(socket, data);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue