mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-11 04:21:12 +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 {
|
fn test(&self, value: &Message) -> bool {
|
||||||
match value.text() {
|
match value.text() {
|
||||||
Some(text) => self.text == 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