mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-23 06:51:01 +01:00
added test caption
This commit is contained in:
parent
ec11b9ed3a
commit
03b0e41fa0
1 changed files with 6 additions and 1 deletions
|
@ -9,7 +9,12 @@ impl Filter<Message> for MessageTextFilter {
|
|||
fn test(&self, value: &Message) -> bool {
|
||||
match value.text() {
|
||||
Some(text) => self.text == text,
|
||||
None => false
|
||||
None => {
|
||||
match value.caption() {
|
||||
Some(caption) => self.text == caption,
|
||||
None => false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue