2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-22 09:57:19 +00:00

Add support for email sign in codes

Fixes #1183
This commit is contained in:
Dan 2022-12-30 15:55:52 +01:00
parent 5d3abd3ab0
commit 1e6209da3b
2 changed files with 4 additions and 0 deletions

View File

@ -358,6 +358,7 @@ class Client(Methods):
enums.SentCodeType.CALL: "phone call",
enums.SentCodeType.FLASH_CALL: "phone flash call",
enums.SentCodeType.FRAGMENT_SMS: "Fragment SMS",
enums.SentCodeType.EMAIL_CODE: "email code"
}
print(f"The confirmation code has been sent via {sent_code_descriptions[sent_code.type]}")

View File

@ -40,3 +40,6 @@ class SentCodeType(AutoName):
FRAGMENT_SMS = raw.types.auth.SentCodeTypeFragmentSms
"The code was sent via Fragment SMS."
EMAIL_CODE = raw.types.auth.SentCodeTypeEmailCode
"The code was sent via email."