ваше сообщение коммита

This commit is contained in:
2025-06-19 20:19:09 +03:00
parent 8301ebb6bd
commit 06713556bd
26 changed files with 8395 additions and 1129 deletions

View File

@@ -19,4 +19,12 @@ function broadcastContactsUpdate() {
}
}
module.exports = { initWSS, broadcastContactsUpdate };
function broadcastMessagesUpdate() {
for (const ws of wsClients) {
if (ws.readyState === WebSocket.OPEN) {
ws.send(JSON.stringify({ type: 'messages-updated' }));
}
}
}
module.exports = { initWSS, broadcastContactsUpdate, broadcastMessagesUpdate };