create literal field in CallbackInfo

reason: to get used literal of button,
for e.g. to edit literals by clicking buttons
This commit is contained in:
Akulij 2025-05-01 14:50:34 +03:00
parent 2b037e0eaa
commit 28cffdde16

View File

@ -16,6 +16,7 @@ where
{ {
pub _id: bson::oid::ObjectId, pub _id: bson::oid::ObjectId,
pub created_at: DateTime<FixedOffset>, pub created_at: DateTime<FixedOffset>,
pub literal: Option<String>,
#[serde(flatten)] #[serde(flatten)]
pub callback: C, pub callback: C,
} }
@ -28,6 +29,7 @@ where
Self { Self {
_id: Default::default(), _id: Default::default(),
created_at: Local::now().into(), created_at: Local::now().into(),
literal: None,
callback, callback,
} }
} }