Update Telethon
This commit is contained in:
@@ -3248,9 +3248,13 @@ class Portal(DBPortal, BasePortal):
|
||||
for item in counts:
|
||||
if item.count == 2:
|
||||
reactions += [
|
||||
MessagePeerReaction(reaction=item.reaction, peer_id=PeerUser(self.tgid)),
|
||||
MessagePeerReaction(
|
||||
reaction=item.reaction, peer_id=PeerUser(self.tg_receiver)
|
||||
reaction=item.reaction, peer_id=PeerUser(self.tgid), date=None
|
||||
),
|
||||
MessagePeerReaction(
|
||||
reaction=item.reaction,
|
||||
peer_id=PeerUser(self.tg_receiver),
|
||||
date=None,
|
||||
),
|
||||
]
|
||||
elif item.count == 1:
|
||||
@@ -3258,6 +3262,7 @@ class Portal(DBPortal, BasePortal):
|
||||
MessagePeerReaction(
|
||||
reaction=item.reaction,
|
||||
peer_id=PeerUser(self.tg_receiver if item.chosen_order else self.tgid),
|
||||
date=None,
|
||||
)
|
||||
)
|
||||
return reactions
|
||||
|
||||
@@ -22,6 +22,7 @@ from telethon.tl.patched import Message
|
||||
from telethon.tl.types import (
|
||||
InputMediaUploadedDocument,
|
||||
InputMediaUploadedPhoto,
|
||||
InputReplyToMessage,
|
||||
TypeDocumentAttribute,
|
||||
TypeInputMedia,
|
||||
TypeInputPeer,
|
||||
@@ -67,6 +68,10 @@ class MautrixTelegramClient(TelegramClient):
|
||||
entity = await self.get_input_entity(entity)
|
||||
reply_to = utils.get_message_id(reply_to)
|
||||
request = SendMediaRequest(
|
||||
entity, media, message=caption or "", entities=entities or [], reply_to_msg_id=reply_to
|
||||
entity,
|
||||
media,
|
||||
message=caption or "",
|
||||
entities=entities or [],
|
||||
reply_to=InputReplyToMessage(reply_to_msg_id=reply_to),
|
||||
)
|
||||
return self._get_response_message(request, await self(request), entity)
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ commonmark>=0.8,<0.10
|
||||
aiohttp>=3,<4
|
||||
yarl>=1,<2
|
||||
mautrix>=0.20.0,<0.21
|
||||
tulir-telethon==1.29.0a2
|
||||
tulir-telethon==1.30.0a1
|
||||
asyncpg>=0.20,<0.28
|
||||
mako>=1,<2
|
||||
setuptools
|
||||
|
||||
Reference in New Issue
Block a user