From 126708d8fa84ff9cb0bfdb09970355990a883aff Mon Sep 17 00:00:00 2001 From: Akulij Date: Sat, 31 May 2025 14:32:08 +0500 Subject: [PATCH 1/2] set literal for leave_application --- mainbot.js | 1 + 1 file changed, 1 insertion(+) diff --git a/mainbot.js b/mainbot.js index 55dfab9..1e32c27 100644 --- a/mainbot.js +++ b/mainbot.js @@ -24,6 +24,7 @@ const dialog = { }, start: start_msg, leave_application: { + literal: "left_application_msg", handler: leave_application }, ask_question: {} From f5d108d350f0d83028fe36806968af9869a3aae2 Mon Sep 17 00:00:00 2001 From: Akulij Date: Sat, 31 May 2025 14:32:23 +0500 Subject: [PATCH 2/2] add debug info when calling js handler --- src/bot_handler.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/bot_handler.rs b/src/bot_handler.rs index d85ddfd..ff380b6 100644 --- a/src/bot_handler.rs +++ b/src/bot_handler.rs @@ -75,6 +75,11 @@ async fn handle_botmessage(bot: Bot, mut db: DB, bm: BotMessage, msg: Message) - None => break 'prop true, }; let jsuser = to_js(ctx, &tguser).unwrap(); + info!( + "Calling handler {:?} with msg literal: {:?}", + handler, + bm.literal() + ); match handler.call_args(vec![jsuser]) { Ok(v) => { if v.is_bool() {