mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-07 15:34:52 +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
1 changed files with 9 additions and 1 deletions
|
|
@ -88,10 +88,18 @@ class SendMessage(BaseClient):
|
||||||
)
|
)
|
||||||
|
|
||||||
if isinstance(r, types.UpdateShortSentMessage):
|
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(
|
return pyrogram.Message(
|
||||||
message_id=r.id,
|
message_id=r.id,
|
||||||
chat=pyrogram.Chat(
|
chat=pyrogram.Chat(
|
||||||
id=list(self.resolve_peer(chat_id).__dict__.values())[0],
|
id=peer_id,
|
||||||
type="private",
|
type="private",
|
||||||
client=self
|
client=self
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue