mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
fix typehint
This commit is contained in:
parent
e0ee3c6b55
commit
db21da5f5c
1 changed files with 2 additions and 2 deletions
|
|
@ -132,7 +132,7 @@ class BaseRequestHandler(ABC):
|
|||
pass
|
||||
|
||||
@abstractmethod
|
||||
def verify_secret(self, secret_token: str) -> bool:
|
||||
def verify_secret(self, telegram_secret_token: str) -> bool:
|
||||
pass
|
||||
|
||||
async def _background_feed_update(self, bot: Bot, update: Dict[str, Any]) -> None:
|
||||
|
|
@ -224,7 +224,7 @@ class SimpleRequestHandler(BaseRequestHandler):
|
|||
self.bot = bot
|
||||
self.secret_token = secret_token
|
||||
|
||||
def verify_secret(self, telegram_secret_token: str) -> bool:
|
||||
def verify_secret(self, telegram_secret_token: Optional[str]) -> bool:
|
||||
if self.secret_token:
|
||||
return secrets.compare_digest(telegram_secret_token, self.secret_token)
|
||||
return True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue