fix: copy_text field must be an object with text key

This commit is contained in:
2026-07-11 21:57:19 +08:00
parent 05b15d9ee3
commit 6d1fe29df4

View File

@@ -173,7 +173,7 @@ def _summary_keyboard(can_reply: bool = True, is_promotion: bool = False,
kb.append([{"text": f"🔗 {text}", "url": url}])
if verification_code:
code = verification_code.split(" ", 1)[-1] if " " in verification_code else verification_code
kb.append([{"text": code, "type": "copy_text", "copy_text": code}])
kb.append([{"text": code, "type": "copy_text", "copy_text": {"text": code}}])
return {"inline_keyboard": kb}