mirror of
https://github.com/civsocit/olgram.git
synced 2025-12-16 01:26:17 +00:00
Шифрование токенов
This commit is contained in:
@@ -114,7 +114,7 @@ class CustomRequestHandler(WebhookRequestHandler):
|
||||
if not bot:
|
||||
return None
|
||||
db_bot_instance.set(bot)
|
||||
dp = Dispatcher(AioBot(bot.token))
|
||||
dp = Dispatcher(AioBot(bot.decrypted_token()))
|
||||
|
||||
dp.register_message_handler(message_handler, content_types=[types.ContentType.TEXT,
|
||||
types.ContentType.CONTACT,
|
||||
|
||||
@@ -26,9 +26,9 @@ async def register_token(bot: Bot) -> bool:
|
||||
:param bot: Бот
|
||||
:return: получилось ли
|
||||
"""
|
||||
await unregister_token(bot.token)
|
||||
await unregister_token(bot.decrypted_token())
|
||||
|
||||
a_bot = AioBot(bot.token)
|
||||
a_bot = AioBot(bot.decrypted_token())
|
||||
certificate = None
|
||||
if ServerSettings.use_custom_cert():
|
||||
certificate = open(ServerSettings.public_path(), 'rb')
|
||||
|
||||
Reference in New Issue
Block a user