From c1e6f9c2ca7236b4d2757c474fa8dc8c85050cc3 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Wed, 4 Apr 2018 22:27:05 +0200 Subject: [PATCH] Handle Voice type --- pyrogram/client/utils.py | 50 +++++++++++++++++++++++++++------------- 1 file changed, 34 insertions(+), 16 deletions(-) diff --git a/pyrogram/client/utils.py b/pyrogram/client/utils.py index 1f24373d..93f8b4ee 100644 --- a/pyrogram/client/utils.py +++ b/pyrogram/client/utils.py @@ -139,6 +139,7 @@ def parse_message(message: types.Message, users: dict, chats: dict): location = None contact = None audio = None + voice = None video = None video_note = None @@ -207,22 +208,38 @@ def parse_message(message: types.Message, users: dict, chats: dict): if types.DocumentAttributeAudio in attributes: audio_attributes = attributes[types.DocumentAttributeAudio] - audio = pyrogram.Audio( - file_id=encode( - pack( - "