Compare commits
2 Commits
fa97e4b098
...
2d47483d55
| Author | SHA1 | Date | |
|---|---|---|---|
| 2d47483d55 | |||
| fc4f664a5c |
@@ -35,7 +35,7 @@ class BaseEventFilter(ABC):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def __ror__(self, other):
|
def __ror__(self, other):
|
||||||
return self.__ror__(other)
|
return self.__or__(other)
|
||||||
|
|
||||||
# XOR
|
# XOR
|
||||||
def __xor__(self, other):
|
def __xor__(self, other):
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ class BodyRegexFilter(BodyExistsFilter):
|
|||||||
if not await super().__call__(room, event, client):
|
if not await super().__call__(room, event, client):
|
||||||
return False
|
return False
|
||||||
try:
|
try:
|
||||||
return self._regex.match(event.body) # type: ignore
|
return self._regex.match(event.body) is not None # type: ignore
|
||||||
except:
|
except:
|
||||||
self._logger.error(traceback.format_exc())
|
self._logger.error(traceback.format_exc())
|
||||||
return False
|
return False
|
||||||
Reference in New Issue
Block a user