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