From 34311f0fbd1a501dc9eb27ec6e6f5532a4fe43cc Mon Sep 17 00:00:00 2001 From: Hemna Date: Wed, 23 Aug 2023 13:15:50 -0400 Subject: [PATCH] fixed an issue in the mobile webchat The global socket var wasn't defined globally in send-message-mobile.js --- aprsd/web/chat/static/js/send-message-mobile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aprsd/web/chat/static/js/send-message-mobile.js b/aprsd/web/chat/static/js/send-message-mobile.js index ad699ad..b8e6c03 100644 --- a/aprsd/web/chat/static/js/send-message-mobile.js +++ b/aprsd/web/chat/static/js/send-message-mobile.js @@ -2,11 +2,11 @@ var cleared = false; var callsign_list = {}; var message_list = {}; var from_msg_list = {}; +const socket = io("/sendmsg"); function size_dict(d){c=0; for (i in d) ++c; return c} function init_chat() { - const socket = io("/sendmsg"); socket.on('connect', function () { console.log("Connected to socketio"); });