Add support for Fragment SMS codes (#1170)

This commit is contained in:
omg-xtao 2022-12-24 03:36:00 +08:00 committed by wulan17
parent aedade2ff2
commit 3e219771bd
No known key found for this signature in database
GPG key ID: 318CD6CD3A6AC0A5
3 changed files with 8 additions and 1 deletions

View file

@ -333,7 +333,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."