From e9be862a93006d324024ed10dab1c5a48aa25d65 Mon Sep 17 00:00:00 2001 From: P0lunin Date: Wed, 23 Oct 2019 12:59:58 +0300 Subject: [PATCH] added test caption --- src/dispatching/dispatchers/filter/filters/text.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/dispatching/dispatchers/filter/filters/text.rs b/src/dispatching/dispatchers/filter/filters/text.rs index 2bb76a0e..c1d06c32 100644 --- a/src/dispatching/dispatchers/filter/filters/text.rs +++ b/src/dispatching/dispatchers/filter/filters/text.rs @@ -9,7 +9,12 @@ impl Filter 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 + } + } } } }