2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-29 13:27:47 +00:00

Return the higher-level Message object instead of the raw update

This commit is contained in:
Dan 2018-08-03 18:37:10 +02:00
parent 6015a14182
commit 8d35559f0b

View File

@ -19,7 +19,7 @@
import os import os
from pyrogram.api import functions, types from pyrogram.api import functions, types
from pyrogram.client.ext import BaseClient from pyrogram.client.ext import BaseClient, utils
from pyrogram.client.types import ( from pyrogram.client.types import (
InputMediaPhoto InputMediaPhoto
) )
@ -61,3 +61,11 @@ class EditMessageMedia(BaseClient):
**style.parse(caption) **style.parse(caption)
) )
) )
for i in r.updates:
if isinstance(i, (types.UpdateEditMessage, types.UpdateEditChannelMessage)):
return utils.parse_messages(
self, i.message,
{i.id: i for i in r.users},
{i.id: i for i in r.chats}
)