From 668229daf52e05841520576bbb62250854321569 Mon Sep 17 00:00:00 2001 From: NeonKirill Date: Fri, 1 Sep 2023 19:11:33 +0200 Subject: [PATCH] Troubleshooting issues with table mode --- chat_client/static/js/sio.js | 2 +- chat_server/server_utils/prompt_utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/chat_client/static/js/sio.js b/chat_client/static/js/sio.js index f65dae8d..286f9802 100644 --- a/chat_client/static/js/sio.js +++ b/chat_client/static/js/sio.js @@ -74,7 +74,7 @@ function initSIO(){ console.info(`setting prompt_id=${promptID} as completed`); if (promptElem){ const promptWinner = document.getElementById(`${promptID}_winner`); - promptWinner.innerText = getPromptWinnerText(data['winner']); + promptWinner.innerHTML = getPromptWinnerText(data['winner']); }else { console.warn(`Failed to get HTML element from prompt_id=${promptID}`); } diff --git a/chat_server/server_utils/prompt_utils.py b/chat_server/server_utils/prompt_utils.py index 5a4f8b82..19838722 100644 --- a/chat_server/server_utils/prompt_utils.py +++ b/chat_server/server_utils/prompt_utils.py @@ -50,7 +50,7 @@ def handle_prompt_message(message: dict) -> bool: :returns True if prompt message was handled, false otherwise """ try: - prompt_id = message.get('promptID') + prompt_id = message.get('prompt_id') prompt_state = PromptStates(int(message.get('promptState', PromptStates.IDLE.value))) user_id = message['userID'] message_id = message['messageID']