diff --git a/signalbot/bot.py b/signalbot/bot.py index 069ac5f..ab806fd 100644 --- a/signalbot/bot.py +++ b/signalbot/bot.py @@ -338,8 +338,8 @@ async def _produce(self, name: int) -> None: def _should_react_for_contact( self, message: Message, - contacts: list[str] | bool, - group_ids: list[str] | bool, + contacts: Union[list[str], bool], + group_ids: Union[list[str], bool], ): """Is the command activated for a certain chat or group?""" @@ -379,7 +379,7 @@ def _should_react_for_contact( def _should_react_for_lambda( self, message: Message, - f: Callable[[Message], bool] | None, + f: Optional[Callable[[Message], bool]] = None, ) -> bool: if f is None: return True