Make Filters.regex work on message captions too
This commit is contained in:
parent
07276e31b9
commit
1d8fd0b836
@ -287,7 +287,7 @@ class Filters:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
def f(_, m):
|
def f(_, m):
|
||||||
m.matches = [i for i in _.p.finditer(m.text or "")]
|
m.matches = [i for i in _.p.finditer(m.text or m.caption or "")]
|
||||||
return bool(m.matches)
|
return bool(m.matches)
|
||||||
|
|
||||||
return create("Regex", f, p=re.compile(pattern, flags))
|
return create("Regex", f, p=re.compile(pattern, flags))
|
||||||
|
Loading…
Reference in New Issue
Block a user