mirror of
https://github.com/PaiGramTeam/PamGram.git
synced 2024-11-16 20:10:36 +00:00
🐛 Fix cache resolution for verification without challenge
修复缓存调用错误导致验证没存储到缓存的问题
This commit is contained in:
parent
ffbb224644
commit
1a83b23084
@ -1,6 +1,6 @@
|
|||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from genshin import GenshinException, Region
|
from genshin import Region, GenshinException
|
||||||
from telegram import Update, ReplyKeyboardRemove, Message, User, InlineKeyboardMarkup, InlineKeyboardButton
|
from telegram import Update, ReplyKeyboardRemove, Message, User, InlineKeyboardMarkup, InlineKeyboardButton
|
||||||
from telegram.constants import ChatAction
|
from telegram.constants import ChatAction
|
||||||
from telegram.ext import CallbackContext, CommandHandler
|
from telegram.ext import CallbackContext, CommandHandler
|
||||||
@ -178,7 +178,7 @@ class StartPlugin(Plugin):
|
|||||||
return
|
return
|
||||||
except APIHelperException as exc:
|
except APIHelperException as exc:
|
||||||
logger.warning(f"用户 %s[%s] ajax 验证失效 错误信息为 %s", user.full_name, user.id, repr(exc))
|
logger.warning(f"用户 %s[%s] ajax 验证失效 错误信息为 %s", user.full_name, user.id, repr(exc))
|
||||||
await self.sign_system.set_challenge(client.uid, gt, challenge)
|
await self.verification_system.set_challenge(client.uid, gt, challenge)
|
||||||
url = f"{config.pass_challenge_user_web}?username={bot_username}&command=verify>={gt}&challenge={challenge}&uid={client.uid}"
|
url = f"{config.pass_challenge_user_web}?username={bot_username}&command=verify>={gt}&challenge={challenge}&uid={client.uid}"
|
||||||
button = InlineKeyboardMarkup([[InlineKeyboardButton("验证", url=url)]])
|
button = InlineKeyboardMarkup([[InlineKeyboardButton("验证", url=url)]])
|
||||||
await message.reply_text("请尽快点击下方手动验证", reply_markup=button)
|
await message.reply_text("请尽快点击下方手动验证", reply_markup=button)
|
||||||
|
Loading…
Reference in New Issue
Block a user