2 Commits

Author SHA1 Message Date
2d47483d55 Fixed BodyRegexFilter returning re.Match 2026-09-12 20:22:02 +03:00
fc4f664a5c Fixed BaseEventFilter.__ror__ recursion 2026-09-12 20:20:41 +03:00
2 changed files with 2 additions and 2 deletions

View File

@@ -35,7 +35,7 @@ class BaseEventFilter(ABC):
)
def __ror__(self, other):
return self.__ror__(other)
return self.__or__(other)
# XOR
def __xor__(self, other):

View File

@@ -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