This commit is contained in:
2023-08-18 15:37:28 +03:00
parent 00952a0e3e
commit 80a87fb8e7
2 changed files with 2 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
chatSocket = new WebSocket(ws_url);
function sendMessageSocket (data) {
chatSocket.send(JSON.stringify(data));

View File

@@ -13,7 +13,7 @@
{#var user_id = {{ user.id }}#}
ws_url = `ws://{% get_ws_address %}/ws/socket-server/?user_id={{ user.id }}`;
const chatSocket = new WebSocket(ws_url);
</script>
<script src='{% static "js/chat_sockets.js" %}'></script>