🐛 Fix endswith match bug

This commit is contained in:
ishkong 2021-08-29 19:18:36 +08:00 committed by GitHub
parent 3fa75b1c78
commit ed1f1c27e2
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)