projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implement notifyAllBut()
[vchess.git]
/
server
/
sockets.js
diff --git
a/server/sockets.js
b/server/sockets.js
index
f3224f1
..
7395af1
100644
(file)
--- a/
server/sockets.js
+++ b/
server/sockets.js
@@
-42,10
+42,10
@@
module.exports = function(wss) {
});
};
// For focus events: no need to target self
});
};
// For focus events: no need to target self
- const notifyAllBut
Me = (page,code,obj={}
) => {
+ const notifyAllBut
= (page,code,obj={},except
) => {
if (!clients[page]) return;
Object.keys(clients[page]).forEach(k => {
if (!clients[page]) return;
Object.keys(clients[page]).forEach(k => {
- if (
k == sid
) return;
+ if (
except.includes(k)
) return;
Object.keys(clients[page][k]).forEach(x => {
send(
clients[page][k][x].socket,
Object.keys(clients[page][k]).forEach(x => {
send(
clients[page][k][x].socket,