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