mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-28 21:07:59 +00:00
Fix bad behaviours for Python <3.6
Pyrogram was relying on dict keys being "ordered" (keys keeping insertion order).
This commit is contained in:
parent
66f70450aa
commit
19b8f648d2
@ -88,10 +88,18 @@ class SendMessage(BaseClient):
|
||||
)
|
||||
|
||||
if isinstance(r, types.UpdateShortSentMessage):
|
||||
peer = self.resolve_peer(chat_id)
|
||||
|
||||
peer_id = (
|
||||
peer.user_id
|
||||
if isinstance(peer, types.InputPeerUser)
|
||||
else -peer.chat_id
|
||||
)
|
||||
|
||||
return pyrogram.Message(
|
||||
message_id=r.id,
|
||||
chat=pyrogram.Chat(
|
||||
id=list(self.resolve_peer(chat_id).__dict__.values())[0],
|
||||
id=peer_id,
|
||||
type="private",
|
||||
client=self
|
||||
),
|
||||
|
Loading…
x
Reference in New Issue
Block a user