Fixed BodyRegexFilter returning re.Match
This commit is contained in:
@@ -190,7 +190,7 @@ class BodyRegexFilter(BodyExistsFilter):
|
||||
if not await super().__call__(room, event, client):
|
||||
return False
|
||||
try:
|
||||
return self._regex.match(event.body) # type: ignore
|
||||
return self._regex.match(event.body) is not None # type: ignore
|
||||
except:
|
||||
self._logger.error(traceback.format_exc())
|
||||
return False
|
||||
Reference in New Issue
Block a user