Compare commits

..

4 Commits

Author SHA1 Message Date
9be1f3ec1d Merge pull request 'set literal for leave_application' (#3) from dev into main
All checks were successful
Build && Deploy / cargo build (push) Successful in 57s
Reviewed-on: #3
2025-05-31 09:33:57 +00:00
fe08b42581 Merge branch 'main' into dev
Some checks failed
Build && Deploy / cargo build (push) Has been cancelled
2025-05-31 09:33:34 +00:00
Akulij
f5d108d350 add debug info when calling js handler
Some checks failed
Build && Deploy / cargo build (push) Has been cancelled
2025-05-31 14:32:23 +05:00
Akulij
126708d8fa set literal for leave_application 2025-05-31 14:32:08 +05:00
2 changed files with 6 additions and 0 deletions

View File

@ -24,6 +24,7 @@ const dialog = {
}, },
start: start_msg, start: start_msg,
leave_application: { leave_application: {
literal: "left_application_msg",
handler: leave_application handler: leave_application
}, },
ask_question: {} ask_question: {}

View File

@ -75,6 +75,11 @@ async fn handle_botmessage(bot: Bot, mut db: DB, bm: BotMessage, msg: Message) -
None => break 'prop true, None => break 'prop true,
}; };
let jsuser = to_js(ctx, &tguser).unwrap(); let jsuser = to_js(ctx, &tguser).unwrap();
info!(
"Calling handler {:?} with msg literal: {:?}",
handler,
bm.literal()
);
match handler.call_args(vec![jsuser]) { match handler.call_args(vec![jsuser]) {
Ok(v) => { Ok(v) => {
if v.is_bool() { if v.is_bool() {