Skip to content
This repository was archived by the owner on Dec 23, 2024. It is now read-only.

Commit c4a47b9

Browse files
authored
Add support for Fragment SMS codes (#1170)
1 parent 8afd459 commit c4a47b9

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

pyrogram/client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,8 @@ async def authorize(self) -> User:
356356
enums.SentCodeType.APP: "Telegram app",
357357
enums.SentCodeType.SMS: "SMS",
358358
enums.SentCodeType.CALL: "phone call",
359-
enums.SentCodeType.FLASH_CALL: "phone flash call"
359+
enums.SentCodeType.FLASH_CALL: "phone flash call",
360+
enums.SentCodeType.FRAGMENT_SMS: "Fragment SMS",
360361
}
361362

362363
print(f"The confirmation code has been sent via {sent_code_descriptions[sent_code.type]}")

pyrogram/enums/next_code_type.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,6 @@ class NextCodeType(AutoName):
3434

3535
SMS = raw.types.auth.CodeTypeSms
3636
"The code was sent via SMS."
37+
38+
FRAGMENT_SMS = raw.types.auth.CodeTypeFragmentSms
39+
"The code was sent via Fragment SMS."

pyrogram/enums/sent_code_type.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,6 @@ class SentCodeType(AutoName):
3737

3838
SMS = raw.types.auth.SentCodeTypeSms
3939
"The code was sent via SMS."
40+
41+
FRAGMENT_SMS = raw.types.auth.SentCodeTypeFragmentSms
42+
"The code was sent via Fragment SMS."

0 commit comments

Comments
 (0)