Moved around where callback_query is detected

This commit is contained in:
Rodger Castle 2026-06-04 22:29:56 -04:00
parent 2d2ec55f03
commit b4726d44ec

View File

@ -42,10 +42,10 @@ sub handle_update {
: 'unknown'; : 'unknown';
warn "DBG update type=$upd_type chat=$chat_id\n"; warn "DBG update type=$upd_type chat=$chat_id\n";
if (my $msg = $update->{message}) { if ($upd_type eq 'callback_query') {
_handle_message($msg, $chat_id, $db, $config, $telegram); _handle_callback($update->{callback_query}, $chat_id, $db, $config, $telegram);
} elsif (my $cbq = $update->{callback_query}) { } elsif ($upd_type eq 'message') {
_handle_callback($cbq, $chat_id, $db, $config, $telegram); _handle_message($update->{message}, $chat_id, $db, $config, $telegram);
} }
} }