feature: variants #22

Merged
akulij merged 19 commits from dev into main 2025-06-05 20:53:03 +00:00
Showing only changes of commit 8a3e8c4705 - Show all commits

View File

@ -87,6 +87,16 @@ async fn handle_botmessage(bot: Bot, mut db: DB, bm: BotMessage, msg: Message) -
None
};
// Filtering to use only defined variants
let variant = match bm
.variants()
.iter()
.any(|v| v == variant.as_ref().map_or("", |v| v))
{
true => variant,
false => None,
};
let is_propagate: bool = match bm.get_handler() {
Some(handler) => 'prop: {
let ctx = match handler.context() {