From a3be6a93550423b3ab35529ab397e5738266ea9f Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Fri, 3 Aug 2018 18:38:04 +0200 Subject: [PATCH] Add support for editing photos with external URLs --- pyrogram/client/methods/messages/edit_message_media.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyrogram/client/methods/messages/edit_message_media.py b/pyrogram/client/methods/messages/edit_message_media.py index 1e42c304..35c24f1a 100644 --- a/pyrogram/client/methods/messages/edit_message_media.py +++ b/pyrogram/client/methods/messages/edit_message_media.py @@ -51,6 +51,10 @@ class EditMessageMedia(BaseClient): access_hash=media.photo.access_hash ) ) + elif media.media.startswith("http"): + media = types.InputMediaPhotoExternal( + url=media.media + ) r = self.send( functions.messages.EditMessage(