From 1e6209da3be0cee0306a53dcc1a22e115eea0a27 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Fri, 30 Dec 2022 15:55:52 +0100 Subject: [PATCH] Add support for email sign in codes Fixes #1183 --- pyrogram/client.py | 1 + pyrogram/enums/sent_code_type.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/pyrogram/client.py b/pyrogram/client.py index 36ab4e4c..f4f6eee3 100644 --- a/pyrogram/client.py +++ b/pyrogram/client.py @@ -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]}") diff --git a/pyrogram/enums/sent_code_type.py b/pyrogram/enums/sent_code_type.py index e3ec6112..474ed6b0 100644 --- a/pyrogram/enums/sent_code_type.py +++ b/pyrogram/enums/sent_code_type.py @@ -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."