2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-28 12:57:52 +00:00

Add support for Fragment SMS codes (#1170)

This commit is contained in:
omg-xtao 2022-12-24 03:36:00 +08:00 committed by GitHub
parent 8afd4597fa
commit c4a47b99ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 1 deletions

View File

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

View File

@ -34,3 +34,6 @@ class NextCodeType(AutoName):
SMS = raw.types.auth.CodeTypeSms
"The code was sent via SMS."
FRAGMENT_SMS = raw.types.auth.CodeTypeFragmentSms
"The code was sent via Fragment SMS."

View File

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