From 175db04731f470559e568595919b1d12f4a1918e Mon Sep 17 00:00:00 2001 From: cool-guy-dev <116984615+cool-dev-guy@users.noreply.github.com> Date: Sun, 1 Oct 2023 21:20:44 +0530 Subject: [PATCH] Update main_v2.js --- static/js/main_v2.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/static/js/main_v2.js b/static/js/main_v2.js index ed84bd6..50d8369 100644 --- a/static/js/main_v2.js +++ b/static/js/main_v2.js @@ -127,9 +127,10 @@ function sendMessage(){ sendMessageToServer(_passableMessage) } } -function sendMessageToServer(text) { +async function sendMessageToServer(text) { var Mcount = parseInt(getStorage('userMessageCount'), 10); - const url = `${proxy}/${document.chatUri}/add/${document.chatUsername};${Mcount}/0/0/${text}`; + var message = await createMessageObject(text) + const url = `${proxy}/${document.chatUri}/add/${document.chatUsername};${Mcount}/0/0/${message}`; sendStorage('userMessageCount',Mcount+1); console.log(url);