From 090483543bcb735292035841b5fa8d413195b47e Mon Sep 17 00:00:00 2001 From: misyaguziya Date: Fri, 30 Aug 2024 23:46:51 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7[WIP/TEST]=20Controller=20:=20?= =?UTF-8?q?=E3=83=81=E3=83=A3=E3=83=83=E3=83=88=E6=99=82=E3=81=ABID?= =?UTF-8?q?=E3=82=92=E4=BB=98=E4=B8=8E=E3=81=99=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-python/webui_controller.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src-python/webui_controller.py b/src-python/webui_controller.py index 47003ba5..a8cab2d2 100644 --- a/src-python/webui_controller.py +++ b/src-python/webui_controller.py @@ -303,7 +303,9 @@ class ChatMessage: def __init__(self, action:Callable[[dict], None]) -> None: self.action = action - def send(self, message): + def send(self, data): + id = data["id"] + message = data["message"] if len(message) > 0: addSentMessageLog(message) translation = "" @@ -345,9 +347,9 @@ class ChatMessage: return {"status":200, "result":{ + "id":id, "message":message, "translation":translation, - "clear":config.ENABLE_AUTO_CLEAR_MESSAGE_BOX }, }