Nice
All checks were successful
Deploy Encrypted Todo App / build-and-push (push) Successful in 4m16s
All checks were successful
Deploy Encrypted Todo App / build-and-push (push) Successful in 4m16s
This commit is contained in:
@ -75,8 +75,10 @@
|
||||
|
||||
function connectWebSocket() {
|
||||
if (!currentUser) return;
|
||||
const protocol =
|
||||
window.location.protocol === "https:" ? "wss:" : "ws:";
|
||||
ws = new WebSocket(
|
||||
`ws://${window.location.host}?userId=${currentUser}`,
|
||||
`${protocol}//${window.location.host}?userId=${currentUser}`,
|
||||
);
|
||||
ws.onmessage = (event) => {
|
||||
const msg = JSON.parse(event.data);
|
||||
|
Reference in New Issue
Block a user