1
0
mirror of https://github.com/civsocit/olgram.git synced 2025-12-19 08:36:17 +00:00

Шифрование токенов

This commit is contained in:
mihalin
2021-09-26 20:36:05 +03:00
parent 188b58d8e2
commit 2e61640f5a
15 changed files with 122 additions and 12 deletions

View File

@@ -99,7 +99,7 @@ async def bot_added(message: types.Message, state: FSMContext):
return await on_unknown_error()
user, _ = await User.get_or_create(telegram_id=message.from_user.id)
bot = Bot(token=token, owner=user, name=test_bot_info.username, super_chat_id=message.from_user.id)
bot = Bot(token=Bot.encrypted_token(token), owner=user, name=test_bot_info.username, super_chat_id=message.from_user.id)
try:
await bot.save()
except IntegrityError: