🔀 Merge pull request #514

🐛 Fix endswith match bug
This commit is contained in:
Mix 2021-08-29 19:53:52 +08:00 committed by GitHub
commit 7ced508f9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -224,7 +224,7 @@ def endswith(msg: Union[str, Tuple[str, ...]],
if event.get_type() != "message":
return False
text = event.get_plaintext()
return bool(pattern.match(text))
return bool(pattern.search(text))
return Rule(_endswith)