mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 09:26:37 +03:00
Update to layer 75 (again)
This commit is contained in:
parent
500792975e
commit
7bc021bba4
|
@ -118,11 +118,15 @@ class _EventCommon(abc.ABC):
|
|||
try:
|
||||
if isinstance(chat, types.InputPeerChannel):
|
||||
result = self._client(
|
||||
functions.channels.GetMessagesRequest(chat, [msg_id])
|
||||
functions.channels.GetMessagesRequest(chat, [
|
||||
types.InputMessageID(msg_id)
|
||||
])
|
||||
)
|
||||
else:
|
||||
result = self._client(
|
||||
functions.messages.GetMessagesRequest([msg_id])
|
||||
functions.messages.GetMessagesRequest([
|
||||
types.InputMessageID(msg_id)
|
||||
])
|
||||
)
|
||||
except RPCError:
|
||||
return None, None
|
||||
|
@ -500,11 +504,13 @@ class NewMessage(_EventBuilder):
|
|||
if self._reply_message is None:
|
||||
if isinstance(self.input_chat, types.InputPeerChannel):
|
||||
r = self._client(functions.channels.GetMessagesRequest(
|
||||
self.input_chat, [self.message.reply_to_msg_id]
|
||||
self.input_chat, [
|
||||
types.InputMessageID(self.message.reply_to_msg_id)
|
||||
]
|
||||
))
|
||||
else:
|
||||
r = self._client(functions.messages.GetMessagesRequest(
|
||||
[self.message.reply_to_msg_id]
|
||||
[types.InputMessageID(self.message.reply_to_msg_id)]
|
||||
))
|
||||
if not isinstance(r, types.messages.MessagesNotModified):
|
||||
self._reply_message = r.messages[0]
|
||||
|
@ -817,7 +823,9 @@ class ChatAction(_EventBuilder):
|
|||
|
||||
if isinstance(self._pinned_message, int) and self.input_chat:
|
||||
r = self._client(functions.channels.GetMessagesRequest(
|
||||
self._input_chat, [self._pinned_message]
|
||||
self._input_chat, [
|
||||
types.InputMessageID(self._pinned_message)
|
||||
]
|
||||
))
|
||||
try:
|
||||
self._pinned_message = next(
|
||||
|
@ -1221,14 +1229,16 @@ class MessageRead(_EventBuilder):
|
|||
if not chat:
|
||||
self._messages = []
|
||||
elif isinstance(chat, types.InputPeerChannel):
|
||||
ids = [types.InputMessageID(x) for x in self._message_ids]
|
||||
self._messages =\
|
||||
self._client(functions.channels.GetMessagesRequest(
|
||||
chat, self._message_ids
|
||||
chat, ids
|
||||
)).messages
|
||||
else:
|
||||
ids = [types.InputMessageID(x) for x in self._message_ids]
|
||||
self._messages =\
|
||||
self._client(functions.messages.GetMessagesRequest(
|
||||
self._message_ids
|
||||
ids
|
||||
)).messages
|
||||
|
||||
return self._messages
|
||||
|
|
|
@ -556,7 +556,7 @@ accountDaysTTL#b8d0afdf days:int = AccountDaysTTL;
|
|||
documentAttributeImageSize#6c37c15c w:int h:int = DocumentAttribute;
|
||||
documentAttributeAnimated#11b58939 = DocumentAttribute;
|
||||
documentAttributeSticker#6319d612 flags:# mask:flags.1?true alt:string stickerset:InputStickerSet mask_coords:flags.0?MaskCoords = DocumentAttribute;
|
||||
documentAttributeVideo#ef02ce6 flags:# round_message:flags.0?true duration:int w:int h:int = DocumentAttribute;
|
||||
documentAttributeVideo#ef02ce6 flags:# round_message:flags.0?true supports_streaming:flags.1?true duration:int w:int h:int = DocumentAttribute;
|
||||
documentAttributeAudio#9852f9c6 flags:# voice:flags.10?true duration:int title:flags.0?string performer:flags.1?string waveform:flags.2?bytes = DocumentAttribute;
|
||||
documentAttributeFilename#15590068 file_name:string = DocumentAttribute;
|
||||
documentAttributeHasStickers#9801d2f7 = DocumentAttribute;
|
||||
|
@ -938,7 +938,15 @@ recentMeUrlStickerSet#bc0a57dc url:string set:StickerSetCovered = RecentMeUrl;
|
|||
|
||||
help.recentMeUrls#e0310d7 urls:Vector<RecentMeUrl> chats:Vector<Chat> users:Vector<User> = help.RecentMeUrls;
|
||||
|
||||
inputSingleMedia#31bc3d25 media:InputMedia flags:# random_id:long message:string entities:flags.0?Vector<MessageEntity> = InputSingleMedia;
|
||||
inputSingleMedia#1cc6e91f flags:# media:InputMedia random_id:long message:string entities:flags.0?Vector<MessageEntity> = InputSingleMedia;
|
||||
|
||||
webAuthorization#cac943f2 hash:long bot_id:int domain:string browser:string platform:string date_created:int date_active:int ip:string region:string = WebAuthorization;
|
||||
|
||||
account.webAuthorizations#ed56c9fc authorizations:Vector<WebAuthorization> users:Vector<User> = account.WebAuthorizations;
|
||||
|
||||
inputMessageID#a676a322 id:int = InputMessage;
|
||||
inputMessageReplyTo#bad88395 id:int = InputMessage;
|
||||
inputMessagePinned#86872538 = InputMessage;
|
||||
|
||||
---functions---
|
||||
|
||||
|
@ -993,6 +1001,9 @@ account.updatePasswordSettings#fa7c4b86 current_password_hash:bytes new_settings
|
|||
account.sendConfirmPhoneCode#1516d7bd flags:# allow_flashcall:flags.0?true hash:string current_number:flags.0?Bool = auth.SentCode;
|
||||
account.confirmPhone#5f2178c3 phone_code_hash:string phone_code:string = Bool;
|
||||
account.getTmpPassword#4a82327e password_hash:bytes period:int = account.TmpPassword;
|
||||
account.getWebAuthorizations#182e6d6f = account.WebAuthorizations;
|
||||
account.resetWebAuthorization#2d01b9ef hash:long = Bool;
|
||||
account.resetWebAuthorizations#682d2594 = Bool;
|
||||
|
||||
users.getUsers#d91a548 id:Vector<InputUser> = Vector<User>;
|
||||
users.getFullUser#ca30a5b1 id:InputUser = UserFull;
|
||||
|
@ -1013,7 +1024,7 @@ contacts.getTopPeers#d4982db5 flags:# correspondents:flags.0?true bots_pm:flags.
|
|||
contacts.resetTopPeerRating#1ae373ac category:TopPeerCategory peer:InputPeer = Bool;
|
||||
contacts.resetSaved#879537f1 = Bool;
|
||||
|
||||
messages.getMessages#4222fa74 id:Vector<int> = messages.Messages;
|
||||
messages.getMessages#63c66506 id:Vector<InputMessage> = messages.Messages;
|
||||
messages.getDialogs#191ba9c5 flags:# exclude_pinned:flags.0?true offset_date:int offset_id:int offset_peer:InputPeer limit:int = messages.Dialogs;
|
||||
messages.getHistory#dcbb8260 peer:InputPeer offset_id:int offset_date:int add_offset:int limit:int max_id:int min_id:int hash:int = messages.Messages;
|
||||
messages.search#39e9ea0 flags:# peer:InputPeer q:string from_id:flags.0?InputUser filter:MessagesFilter min_date:int max_date:int offset_id:int add_offset:int limit:int max_id:int min_id:int = messages.Messages;
|
||||
|
@ -1141,7 +1152,7 @@ channels.readHistory#cc104937 channel:InputChannel max_id:int = Bool;
|
|||
channels.deleteMessages#84c1fd4e channel:InputChannel id:Vector<int> = messages.AffectedMessages;
|
||||
channels.deleteUserHistory#d10dd71b channel:InputChannel user_id:InputUser = messages.AffectedHistory;
|
||||
channels.reportSpam#fe087810 channel:InputChannel user_id:InputUser id:Vector<int> = Bool;
|
||||
channels.getMessages#93d7b347 channel:InputChannel id:Vector<int> = messages.Messages;
|
||||
channels.getMessages#ad8c9a23 channel:InputChannel id:Vector<InputMessage> = messages.Messages;
|
||||
channels.getParticipants#123e05e9 channel:InputChannel filter:ChannelParticipantsFilter offset:int limit:int hash:int = channels.ChannelParticipants;
|
||||
channels.getParticipant#546dd7a6 channel:InputChannel user_id:InputUser = channels.ChannelParticipant;
|
||||
channels.getChannels#a7f6bbb id:Vector<InputChannel> = messages.Chats;
|
||||
|
|
Loading…
Reference in New Issue
Block a user