make BotMessage.meta optional

This commit is contained in:
Akulij 2025-06-05 22:35:51 +05:00
parent b202f385fe
commit 303dbfdaa8

View File

@ -500,8 +500,7 @@ pub struct BotMessage {
state: Option<String>,
/// flag options to command is meta, so it will be appended to user.metas in db
#[serde(default)]
meta: bool,
meta: Option<bool>,
handler: Option<BotFunction>,
}
@ -523,7 +522,7 @@ impl BotMessage {
}
pub fn meta(&self) -> bool {
self.meta
self.meta.unwrap_or(false)
}
}