mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-29 11:03:16 +00:00
🐛 Fix challenge
is not stored in the cache
修复 challenge 变量没有存储到 redis 缓存问题
This commit is contained in:
parent
9ed30d4143
commit
80577042da
@ -74,16 +74,17 @@ class SignSystem:
|
|||||||
) -> Optional[InlineKeyboardMarkup]:
|
) -> Optional[InlineKeyboardMarkup]:
|
||||||
if not config.pass_challenge_user_web:
|
if not config.pass_challenge_user_web:
|
||||||
return None
|
return None
|
||||||
|
if challenge and gt:
|
||||||
|
await self.set_challenge(uid, gt, challenge)
|
||||||
if not challenge or not gt:
|
if not challenge or not gt:
|
||||||
gt, challenge = await self.get_challenge(uid)
|
gt, challenge = await self.get_challenge(uid)
|
||||||
if not challenge or not gt:
|
if not challenge or not gt:
|
||||||
return None
|
return None
|
||||||
if callback:
|
if callback:
|
||||||
await self.set_challenge(uid, gt, challenge)
|
|
||||||
data = f"sign|{user_id}|{uid}"
|
data = f"sign|{user_id}|{uid}"
|
||||||
return InlineKeyboardMarkup([[InlineKeyboardButton("请尽快点我进行手动验证", callback_data=data)]])
|
return InlineKeyboardMarkup([[InlineKeyboardButton("请尽快点我进行手动验证", callback_data=data)]])
|
||||||
else:
|
else:
|
||||||
url = f"{config.pass_challenge_user_web}?username={bot.app.bot.username}>={gt}&challenge={challenge}&uid={uid}"
|
url = f"{config.pass_challenge_user_web}?username={bot.app.bot.username}&command=sign>={gt}&challenge={challenge}&uid={uid}"
|
||||||
return InlineKeyboardMarkup([[InlineKeyboardButton("请尽快点我进行手动验证", url=url)]])
|
return InlineKeyboardMarkup([[InlineKeyboardButton("请尽快点我进行手动验证", url=url)]])
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
Loading…
Reference in New Issue
Block a user