Created
March 3, 2017 13:09
-
-
Save CharlesOkwuagwu/46db125d8fe928f5a96622ca5b15fdd1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule TL do | |
use Bitwise | |
defmodule UserInfo do | |
defstruct user_id: nil, | |
first_name: "", | |
last_name: "", | |
mobile: "", | |
access_hash: 0, | |
username: "" | |
end | |
# Utils | |
def file(x), do: decode(Base.decode16!(File.read!(x))) | |
def hex(x), do: decode(:binary.encode_unsigned x) | |
# Decoding | |
defp decode(:True, rm), do: {true, rm} | |
defp decode(:False, rm), do: {false, rm} | |
defp decode(:Bool, <<181, 117, 114, 153, rm::binary>>), do: {false, rm} | |
defp decode(:Bool, <<55, 151, 121, 188, rm::binary>>), do: {true, rm} | |
defp decode(:Bytes, bin), do: decode(:String, bin) | |
defp decode(:Double, <<val::little-float-64, rm::binary>>), do: {val, rm} | |
defp decode(:Int, <<val::little-4*8, rm::binary>>), do: {val, rm} | |
defp decode(:Int128, <<val::little-16*8, rm::binary>>), do: {val, rm} | |
defp decode(:Int256, <<val::little-32*8, rm::binary>>), do: {val, rm} | |
defp decode(:Long, <<val::little-8*8, rm::binary>>), do: {val, rm} | |
defp decode(:String, <<254, len::little-3*8, val::binary-size(len)-unit(8), rm::binary>>) when rem(len, 4) == 0, do: {val, rm} | |
defp decode(:String, <<254, len::little-3*8, val::binary-size(len)-unit(8), rm::binary>>) do | |
pad = 4 - rem(len, 4) | |
<<_::binary-size(pad)-unit(8), rm::binary>> = rm | |
{val, rm} | |
end | |
defp decode(:String, <<len, val::binary-size(len)-unit(8), rm::binary>>) when rem(len + 1, 4) == 0, do: {val, rm} | |
defp decode(:String, <<len, val::binary-size(len)-unit(8), rm::binary>>) do | |
pad = 4 - rem(len + 1, 4) | |
<<_::binary-size(pad)-unit(8), rm::binary>> = rm | |
{val, rm} | |
end | |
defp decode([type], <<21, 196, 181, 28, cnt::little-4*8, bin::binary>>), do: dec_v(type, bin, cnt, []) | |
defp decode([_typ], <<code::little-4*8, _::binary>> = bin), do: dec_o(code, bin, []) | |
defp decode(_, bin), do: decode(bin) | |
defp decode(bin, flag, ix) when band(flag, ix) == ix, do: decode(bin) | |
defp decode(bin, _, _), do: {nil, bin} | |
defp decode(type, bin, flag, ix) when band(flag, ix) == ix, do: decode(type, bin) | |
defp decode(_, bin, _, _), do: {nil, bin} | |
defp dec_v(_, e, 0, acc), do: {Enum.reverse(acc), e} | |
defp dec_v(_,"", _, acc), do: {Enum.reverse(acc),""} | |
defp dec_v(type, bin, cnt, acc) do | |
{v, e} = decode(type, bin) | |
dec_v(type, e, cnt - 1, [v | acc]) | |
end | |
defp dec_o(c0, <<c1::little-4*8, _::binary>> = bin, acc) when c0 != c1, do: {Enum.reverse(acc), bin} | |
defp dec_o(c0, <<c1::little-4*8, _::binary>> = bin, acc) when c0 == c1 do | |
{v, e}= decode(bin) | |
dec_o(c0, e, [v | acc]) | |
end | |
# Encoding | |
defp encode(:Int, nil), do: <<0::little-4*8>> | |
defp encode(:String, nil), do: encode(:String, "") | |
defp encode(:Long, nil), do: <<0::little-8*8>> | |
defp encode(:Bytes, nil), do: encode(:String, "") | |
defp encode(:Int128, nil), do: <<0::little-16*8>> | |
defp encode(:Double, nil), do: <<0::little-float-64>> | |
defp encode(:Int256, nil), do: <<0::little-32*8>> | |
defp encode(:Int, arg) when is_binary(arg), do: arg | |
defp encode(:Long, arg) when is_binary(arg), do: arg | |
defp encode(:Int128, arg) when is_binary(arg), do: arg | |
defp encode(:Double, arg) when is_binary(arg), do: arg | |
defp encode(:Int256, arg) when is_binary(arg), do: arg | |
defp encode(:Int, arg), do: <<arg::little-4*8>> | |
defp encode(:String, arg) do | |
case byte_size(arg) do | |
len when len > 253 and rem(len, 4) == 0 -> <<254, len::little-3*8, arg::binary>> | |
len when len < 254 and rem(len + 1, 4) == 0 -> <<len, arg::binary>> | |
len when len > 253 -> pad = 4 - rem(len, 4); <<254, len::little-3*8, arg::binary-size(len), 0::size(pad)-unit(8)>> | |
len when len < 254 -> pad = 4 - rem(len + 1, 4); <<len, arg::binary-size(len), 0::size(pad)-unit(8)>> | |
end | |
end | |
defp encode(:Long, arg), do: <<arg::little-8*8>> | |
defp encode(:Bytes, arg), do: encode(:String, arg) | |
# defp encode(:Bool, true), do: <<55, 151, 121, 188>> #0xBC799737 | |
# defp encode(:Bool, false), do: <<181, 117, 114, 153>> #0x997275B5 | |
defp encode(:Int128, arg), do: <<arg::little-16*8>> | |
defp encode(:True, true), do: ""# <<57, 211, 237, 63>> #0x3FEDD339 | |
defp encode(:Double, arg), do: <<arg::little-float-64>> | |
defp encode(:Int256, arg), do: <<arg::little-32*8>> | |
# simple flagged | |
defp enc_f(x, arg, flags, ix) do | |
if band(flags, ix) == ix, do: encode(x, arg), else: <<>> | |
end | |
# object flagged | |
defp enc_f(arg, flags, ix) do | |
if band(flags, ix) == ix, do: encode(arg), else: <<>> | |
end | |
# simple vector | |
defp enc_v(x, arg), do: enc_v(x, arg, 0, "") | |
defp enc_v(_, [], cnt, acc), do: <<21, 196, 181, 28, cnt::little-4*8, acc::binary>> | |
defp enc_v(x, [arg | args], cnt, acc), do: enc_v(x, args, cnt + 1, acc <> encode(x, arg)) | |
# object vector | |
defp enc_v(arg), do: enc_v(arg, 0, "") | |
defp enc_v([], cnt, acc), do: <<21, 196, 181, 28, cnt::little-4*8, acc::binary>> | |
defp enc_v([arg | args], cnt, acc), do: enc_v(args, cnt + 1, acc <> encode(arg)) | |
defp enc_vf(arg, flags, ix) do | |
if band(flags, ix) == ix, do: enc_v(arg, 0, ""), else: <<>> | |
end | |
# Layer 62 | |
# Types | |
defmodule ResPQ do defstruct nonce: nil, server_nonce: nil, pq: nil, server_public_key_fingerprints: [] end | |
defmodule P_Q_Inner_Data do defstruct pq: nil, p: nil, q: nil, nonce: nil, server_nonce: nil, new_nonce: nil end | |
defmodule Server_DH_Params_Fail do defstruct nonce: nil, server_nonce: nil, new_nonce_hash: nil end | |
defmodule Server_DH_Params_Ok do defstruct nonce: nil, server_nonce: nil, encrypted_answer: nil end | |
defmodule Server_DH_Inner_Data do defstruct nonce: nil, server_nonce: nil, g: nil, dh_prime: nil, g_a: nil, server_time: nil end | |
defmodule Client_DH_Inner_Data do defstruct nonce: nil, server_nonce: nil, retry_id: nil, g_b: nil end | |
defmodule Dh_Gen_Ok do defstruct nonce: nil, server_nonce: nil, new_nonce_hash1: nil end | |
defmodule Dh_Gen_Retry do defstruct nonce: nil, server_nonce: nil, new_nonce_hash2: nil end | |
defmodule Dh_Gen_Fail do defstruct nonce: nil, server_nonce: nil, new_nonce_hash3: nil end | |
defmodule Msgs_Ack do defstruct msg_ids: [] end | |
defmodule Bad_Msg_Notification do defstruct bad_msg_id: nil, bad_msg_seqno: nil, error_code: nil end | |
defmodule Bad_Server_Salt do defstruct bad_msg_id: nil, bad_msg_seqno: nil, error_code: nil, new_server_salt: nil end | |
defmodule Msgs_State_Req do defstruct msg_ids: [] end | |
defmodule Msgs_State_Info do defstruct req_msg_id: nil, info: nil end | |
defmodule Msgs_All_Info do defstruct msg_ids: [], info: nil end | |
defmodule Msg_Detailed_Info do defstruct msg_id: nil, answer_msg_id: nil, bytes: nil, status: nil end | |
defmodule Msg_New_Detailed_Info do defstruct answer_msg_id: nil, bytes: nil, status: nil end | |
defmodule Msg_Resend_Req do defstruct msg_ids: [] end | |
defmodule Rpc_Result do defstruct req_msg_id: nil, result: nil end | |
defmodule Rpc_Error do defstruct error_code: nil, error_message: nil end | |
defmodule Rpc_Answer_Unknown do defstruct [] end | |
defmodule Rpc_Answer_Dropped_Running do defstruct [] end | |
defmodule Rpc_Answer_Dropped do defstruct msg_id: nil, seq_no: nil, bytes: nil end | |
defmodule Future_Salt do defstruct valid_since: nil, valid_until: nil, salt: nil end | |
defmodule Future_Salts do defstruct req_msg_id: nil, now: nil, salts: [] end | |
defmodule Pong do defstruct msg_id: nil, ping_id: nil end | |
defmodule Destroy_Session_Ok do defstruct session_id: nil end | |
defmodule Destroy_Session_None do defstruct session_id: nil end | |
defmodule New_Session_Created do defstruct first_msg_id: nil, unique_id: nil, server_salt: nil end | |
defmodule Gzip_Packed do defstruct packed_data: nil end | |
defmodule Http_Wait do defstruct max_delay: nil, wait_after: nil, max_wait: nil end | |
defmodule BoolFalse do defstruct [] end | |
defmodule BoolTrue do defstruct [] end | |
defmodule True do defstruct [] end | |
defmodule Error do defstruct code: nil, text: nil end | |
defmodule Null do defstruct [] end | |
defmodule InputPeerEmpty do defstruct [] end | |
defmodule InputPeerSelf do defstruct [] end | |
defmodule InputPeerChat do defstruct chat_id: nil end | |
defmodule InputPeerUser do defstruct user_id: nil, access_hash: nil end | |
defmodule InputPeerChannel do defstruct channel_id: nil, access_hash: nil end | |
defmodule InputUserEmpty do defstruct [] end | |
defmodule InputUserSelf do defstruct [] end | |
defmodule InputUser do defstruct user_id: nil, access_hash: nil end | |
defmodule InputPhoneContact do defstruct client_id: nil, phone: nil, first_name: nil, last_name: nil end | |
defmodule InputFile do defstruct id: nil, parts: nil, name: nil, md5_checksum: nil end | |
defmodule InputFileBig do defstruct id: nil, parts: nil, name: nil end | |
defmodule InputMediaEmpty do defstruct [] end | |
defmodule InputMediaUploadedPhoto do defstruct flags: nil, file: nil, caption: nil, stickers: [] end | |
defmodule InputMediaPhoto do defstruct id: nil, caption: nil end | |
defmodule InputMediaGeoPoint do defstruct geo_point: nil end | |
defmodule InputMediaContact do defstruct phone_number: nil, first_name: nil, last_name: nil end | |
defmodule InputMediaUploadedDocument do defstruct flags: nil, file: nil, mime_type: nil, attributes: [], caption: nil, stickers: [] end | |
defmodule InputMediaUploadedThumbDocument do defstruct flags: nil, file: nil, thumb: nil, mime_type: nil, attributes: [], caption: nil, stickers: [] end | |
defmodule InputMediaDocument do defstruct id: nil, caption: nil end | |
defmodule InputMediaVenue do defstruct geo_point: nil, title: nil, address: nil, provider: nil, venue_id: nil end | |
defmodule InputMediaGifExternal do defstruct url: nil, q: nil end | |
defmodule InputMediaPhotoExternal do defstruct url: nil, caption: nil end | |
defmodule InputMediaDocumentExternal do defstruct url: nil, caption: nil end | |
defmodule InputMediaGame do defstruct id: nil end | |
defmodule InputChatPhotoEmpty do defstruct [] end | |
defmodule InputChatUploadedPhoto do defstruct file: nil end | |
defmodule InputChatPhoto do defstruct id: nil end | |
defmodule InputGeoPointEmpty do defstruct [] end | |
defmodule InputGeoPoint do defstruct lat: nil, long: nil end | |
defmodule InputPhotoEmpty do defstruct [] end | |
defmodule InputPhoto do defstruct id: nil, access_hash: nil end | |
defmodule InputFileLocation do defstruct volume_id: nil, local_id: nil, secret: nil end | |
defmodule InputEncryptedFileLocation do defstruct id: nil, access_hash: nil end | |
defmodule InputDocumentFileLocation do defstruct id: nil, access_hash: nil, version: nil end | |
defmodule InputAppEvent do defstruct time: nil, type: nil, peer: nil, data: nil end | |
defmodule PeerUser do defstruct user_id: nil end | |
defmodule PeerChat do defstruct chat_id: nil end | |
defmodule PeerChannel do defstruct channel_id: nil end | |
defmodule Storage.FileUnknown do defstruct [] end | |
defmodule Storage.FileJpeg do defstruct [] end | |
defmodule Storage.FileGif do defstruct [] end | |
defmodule Storage.FilePng do defstruct [] end | |
defmodule Storage.FilePdf do defstruct [] end | |
defmodule Storage.FileMp3 do defstruct [] end | |
defmodule Storage.FileMov do defstruct [] end | |
defmodule Storage.FilePartial do defstruct [] end | |
defmodule Storage.FileMp4 do defstruct [] end | |
defmodule Storage.FileWebp do defstruct [] end | |
defmodule FileLocationUnavailable do defstruct volume_id: nil, local_id: nil, secret: nil end | |
defmodule FileLocation do defstruct dc_id: nil, volume_id: nil, local_id: nil, secret: nil end | |
defmodule UserEmpty do defstruct id: nil end | |
defmodule User do defstruct flags: nil, self: nil, contact: nil, mutual_contact: nil, deleted: nil, bot: nil, bot_chat_history: nil, bot_nochats: nil, verified: nil, restricted: nil, min: nil, bot_inline_geo: nil, id: nil, access_hash: nil, first_name: nil, last_name: nil, username: nil, phone: nil, photo: nil, status: nil, bot_info_version: nil, restriction_reason: nil, bot_inline_placeholder: nil end | |
defmodule UserProfilePhotoEmpty do defstruct [] end | |
defmodule UserProfilePhoto do defstruct photo_id: nil, photo_small: nil, photo_big: nil end | |
defmodule UserStatusEmpty do defstruct [] end | |
defmodule UserStatusOnline do defstruct expires: nil end | |
defmodule UserStatusOffline do defstruct was_online: nil end | |
defmodule UserStatusRecently do defstruct [] end | |
defmodule UserStatusLastWeek do defstruct [] end | |
defmodule UserStatusLastMonth do defstruct [] end | |
defmodule ChatEmpty do defstruct id: nil end | |
defmodule Chat do defstruct flags: nil, creator: nil, kicked: nil, left: nil, admins_enabled: nil, admin: nil, deactivated: nil, id: nil, title: nil, photo: nil, participants_count: nil, date: nil, version: nil, migrated_to: nil end | |
defmodule ChatForbidden do defstruct id: nil, title: nil end | |
defmodule Channel do defstruct flags: nil, creator: nil, kicked: nil, left: nil, editor: nil, moderator: nil, broadcast: nil, verified: nil, megagroup: nil, restricted: nil, democracy: nil, signatures: nil, min: nil, id: nil, access_hash: nil, title: nil, username: nil, photo: nil, date: nil, version: nil, restriction_reason: nil end | |
defmodule ChannelForbidden do defstruct flags: nil, broadcast: nil, megagroup: nil, id: nil, access_hash: nil, title: nil end | |
defmodule ChatFull do defstruct id: nil, participants: nil, chat_photo: nil, notify_settings: nil, exported_invite: nil, bot_info: [] end | |
defmodule ChannelFull do defstruct flags: nil, can_view_participants: nil, can_set_username: nil, id: nil, about: nil, participants_count: nil, admins_count: nil, kicked_count: nil, read_inbox_max_id: nil, read_outbox_max_id: nil, unread_count: nil, chat_photo: nil, notify_settings: nil, exported_invite: nil, bot_info: [], migrated_from_chat_id: nil, migrated_from_max_id: nil, pinned_msg_id: nil end | |
defmodule ChatParticipant do defstruct user_id: nil, inviter_id: nil, date: nil end | |
defmodule ChatParticipantCreator do defstruct user_id: nil end | |
defmodule ChatParticipantAdmin do defstruct user_id: nil, inviter_id: nil, date: nil end | |
defmodule ChatParticipantsForbidden do defstruct flags: nil, chat_id: nil, self_participant: nil end | |
defmodule ChatParticipants do defstruct chat_id: nil, participants: [], version: nil end | |
defmodule ChatPhotoEmpty do defstruct [] end | |
defmodule ChatPhoto do defstruct photo_small: nil, photo_big: nil end | |
defmodule MessageEmpty do defstruct id: nil end | |
defmodule Message do defstruct flags: nil, out: nil, mentioned: nil, media_unread: nil, silent: nil, post: nil, id: nil, from_id: nil, to_id: nil, fwd_from: nil, via_bot_id: nil, reply_to_msg_id: nil, date: nil, message: nil, media: nil, reply_markup: nil, entities: [], views: nil, edit_date: nil end | |
defmodule MessageService do defstruct flags: nil, out: nil, mentioned: nil, media_unread: nil, silent: nil, post: nil, id: nil, from_id: nil, to_id: nil, reply_to_msg_id: nil, date: nil, action: nil end | |
defmodule MessageMediaEmpty do defstruct [] end | |
defmodule MessageMediaPhoto do defstruct photo: nil, caption: nil end | |
defmodule MessageMediaGeo do defstruct geo: nil end | |
defmodule MessageMediaContact do defstruct phone_number: nil, first_name: nil, last_name: nil, user_id: nil end | |
defmodule MessageMediaUnsupported do defstruct [] end | |
defmodule MessageMediaDocument do defstruct document: nil, caption: nil end | |
defmodule MessageMediaWebPage do defstruct webpage: nil end | |
defmodule MessageMediaVenue do defstruct geo: nil, title: nil, address: nil, provider: nil, venue_id: nil end | |
defmodule MessageMediaGame do defstruct game: nil end | |
defmodule MessageActionEmpty do defstruct [] end | |
defmodule MessageActionChatCreate do defstruct title: nil, users: [] end | |
defmodule MessageActionChatEditTitle do defstruct title: nil end | |
defmodule MessageActionChatEditPhoto do defstruct photo: nil end | |
defmodule MessageActionChatDeletePhoto do defstruct [] end | |
defmodule MessageActionChatAddUser do defstruct users: [] end | |
defmodule MessageActionChatDeleteUser do defstruct user_id: nil end | |
defmodule MessageActionChatJoinedByLink do defstruct inviter_id: nil end | |
defmodule MessageActionChannelCreate do defstruct title: nil end | |
defmodule MessageActionChatMigrateTo do defstruct channel_id: nil end | |
defmodule MessageActionChannelMigrateFrom do defstruct title: nil, chat_id: nil end | |
defmodule MessageActionPinMessage do defstruct [] end | |
defmodule MessageActionHistoryClear do defstruct [] end | |
defmodule MessageActionGameScore do defstruct game_id: nil, score: nil end | |
defmodule MessageActionPhoneCall do defstruct flags: nil, call_id: nil, reason: nil, duration: nil end | |
defmodule Dialog do defstruct flags: nil, pinned: nil, peer: nil, top_message: nil, read_inbox_max_id: nil, read_outbox_max_id: nil, unread_count: nil, notify_settings: nil, pts: nil, draft: nil end | |
defmodule PhotoEmpty do defstruct id: nil end | |
defmodule Photo do defstruct flags: nil, has_stickers: nil, id: nil, access_hash: nil, date: nil, sizes: [] end | |
defmodule PhotoSizeEmpty do defstruct type: nil end | |
defmodule PhotoSize do defstruct type: nil, location: nil, w: nil, h: nil, size: nil end | |
defmodule PhotoCachedSize do defstruct type: nil, location: nil, w: nil, h: nil, bytes: nil end | |
defmodule GeoPointEmpty do defstruct [] end | |
defmodule GeoPoint do defstruct long: nil, lat: nil end | |
defmodule Auth.CheckedPhone do defstruct phone_registered: nil end | |
defmodule Auth.SentCode do defstruct flags: nil, phone_registered: nil, type: nil, phone_code_hash: nil, next_type: nil, timeout: nil end | |
defmodule Auth.Authorization do defstruct flags: nil, tmp_sessions: nil, user: nil end | |
defmodule Auth.ExportedAuthorization do defstruct id: nil, bytes: nil end | |
defmodule InputNotifyPeer do defstruct peer: nil end | |
defmodule InputNotifyUsers do defstruct [] end | |
defmodule InputNotifyChats do defstruct [] end | |
defmodule InputNotifyAll do defstruct [] end | |
defmodule InputPeerNotifyEventsEmpty do defstruct [] end | |
defmodule InputPeerNotifyEventsAll do defstruct [] end | |
defmodule InputPeerNotifySettings do defstruct flags: nil, show_previews: nil, silent: nil, mute_until: nil, sound: nil end | |
defmodule PeerNotifyEventsEmpty do defstruct [] end | |
defmodule PeerNotifyEventsAll do defstruct [] end | |
defmodule PeerNotifySettingsEmpty do defstruct [] end | |
defmodule PeerNotifySettings do defstruct flags: nil, show_previews: nil, silent: nil, mute_until: nil, sound: nil end | |
defmodule PeerSettings do defstruct flags: nil, report_spam: nil end | |
defmodule WallPaper do defstruct id: nil, title: nil, sizes: [], color: nil end | |
defmodule WallPaperSolid do defstruct id: nil, title: nil, bg_color: nil, color: nil end | |
defmodule InputReportReasonSpam do defstruct [] end | |
defmodule InputReportReasonViolence do defstruct [] end | |
defmodule InputReportReasonPornography do defstruct [] end | |
defmodule InputReportReasonOther do defstruct text: nil end | |
defmodule UserFull do defstruct flags: nil, blocked: nil, phone_calls_available: nil, user: nil, about: nil, link: nil, profile_photo: nil, notify_settings: nil, bot_info: nil, common_chats_count: nil end | |
defmodule Contact do defstruct user_id: nil, mutual: nil end | |
defmodule ImportedContact do defstruct user_id: nil, client_id: nil end | |
defmodule ContactBlocked do defstruct user_id: nil, date: nil end | |
defmodule ContactStatus do defstruct user_id: nil, status: nil end | |
defmodule Contacts.Link do defstruct my_link: nil, foreign_link: nil, user: nil end | |
defmodule Contacts.ContactsNotModified do defstruct [] end | |
defmodule Contacts.Contacts do defstruct contacts: [], users: [] end | |
defmodule Contacts.ImportedContacts do defstruct imported: [], retry_contacts: [], users: [] end | |
defmodule Contacts.Blocked do defstruct blocked: [], users: [] end | |
defmodule Contacts.BlockedSlice do defstruct count: nil, blocked: [], users: [] end | |
defmodule Messages.Dialogs do defstruct dialogs: [], messages: [], chats: [], users: [] end | |
defmodule Messages.DialogsSlice do defstruct count: nil, dialogs: [], messages: [], chats: [], users: [] end | |
defmodule Messages.Messages do defstruct messages: [], chats: [], users: [] end | |
defmodule Messages.MessagesSlice do defstruct count: nil, messages: [], chats: [], users: [] end | |
defmodule Messages.ChannelMessages do defstruct flags: nil, pts: nil, count: nil, messages: [], chats: [], users: [] end | |
defmodule Messages.Chats do defstruct chats: [] end | |
defmodule Messages.ChatsSlice do defstruct count: nil, chats: [] end | |
defmodule Messages.ChatFull do defstruct full_chat: nil, chats: [], users: [] end | |
defmodule Messages.AffectedHistory do defstruct pts: nil, pts_count: nil, offset: nil end | |
defmodule InputMessagesFilterEmpty do defstruct [] end | |
defmodule InputMessagesFilterPhotos do defstruct [] end | |
defmodule InputMessagesFilterVideo do defstruct [] end | |
defmodule InputMessagesFilterPhotoVideo do defstruct [] end | |
defmodule InputMessagesFilterPhotoVideoDocuments do defstruct [] end | |
defmodule InputMessagesFilterDocument do defstruct [] end | |
defmodule InputMessagesFilterUrl do defstruct [] end | |
defmodule InputMessagesFilterGif do defstruct [] end | |
defmodule InputMessagesFilterVoice do defstruct [] end | |
defmodule InputMessagesFilterMusic do defstruct [] end | |
defmodule InputMessagesFilterChatPhotos do defstruct [] end | |
defmodule InputMessagesFilterPhoneCalls do defstruct flags: nil, missed: nil end | |
defmodule UpdateNewMessage do defstruct message: nil, pts: nil, pts_count: nil end | |
defmodule UpdateMessageID do defstruct id: nil, random_id: nil end | |
defmodule UpdateDeleteMessages do defstruct messages: [], pts: nil, pts_count: nil end | |
defmodule UpdateUserTyping do defstruct user_id: nil, action: nil end | |
defmodule UpdateChatUserTyping do defstruct chat_id: nil, user_id: nil, action: nil end | |
defmodule UpdateChatParticipants do defstruct participants: nil end | |
defmodule UpdateUserStatus do defstruct user_id: nil, status: nil end | |
defmodule UpdateUserName do defstruct user_id: nil, first_name: nil, last_name: nil, username: nil end | |
defmodule UpdateUserPhoto do defstruct user_id: nil, date: nil, photo: nil, previous: nil end | |
defmodule UpdateContactRegistered do defstruct user_id: nil, date: nil end | |
defmodule UpdateContactLink do defstruct user_id: nil, my_link: nil, foreign_link: nil end | |
defmodule UpdateNewEncryptedMessage do defstruct message: nil, qts: nil end | |
defmodule UpdateEncryptedChatTyping do defstruct chat_id: nil end | |
defmodule UpdateEncryption do defstruct chat: nil, date: nil end | |
defmodule UpdateEncryptedMessagesRead do defstruct chat_id: nil, max_date: nil, date: nil end | |
defmodule UpdateChatParticipantAdd do defstruct chat_id: nil, user_id: nil, inviter_id: nil, date: nil, version: nil end | |
defmodule UpdateChatParticipantDelete do defstruct chat_id: nil, user_id: nil, version: nil end | |
defmodule UpdateDcOptions do defstruct dc_options: [] end | |
defmodule UpdateUserBlocked do defstruct user_id: nil, blocked: nil end | |
defmodule UpdateNotifySettings do defstruct peer: nil, notify_settings: nil end | |
defmodule UpdateServiceNotification do defstruct flags: nil, popup: nil, inbox_date: nil, type: nil, message: nil, media: nil, entities: [] end | |
defmodule UpdatePrivacy do defstruct key: nil, rules: [] end | |
defmodule UpdateUserPhone do defstruct user_id: nil, phone: nil end | |
defmodule UpdateReadHistoryInbox do defstruct peer: nil, max_id: nil, pts: nil, pts_count: nil end | |
defmodule UpdateReadHistoryOutbox do defstruct peer: nil, max_id: nil, pts: nil, pts_count: nil end | |
defmodule UpdateWebPage do defstruct webpage: nil, pts: nil, pts_count: nil end | |
defmodule UpdateReadMessagesContents do defstruct messages: [], pts: nil, pts_count: nil end | |
defmodule UpdateChannelTooLong do defstruct flags: nil, channel_id: nil, pts: nil end | |
defmodule UpdateChannel do defstruct channel_id: nil end | |
defmodule UpdateNewChannelMessage do defstruct message: nil, pts: nil, pts_count: nil end | |
defmodule UpdateReadChannelInbox do defstruct channel_id: nil, max_id: nil end | |
defmodule UpdateDeleteChannelMessages do defstruct channel_id: nil, messages: [], pts: nil, pts_count: nil end | |
defmodule UpdateChannelMessageViews do defstruct channel_id: nil, id: nil, views: nil end | |
defmodule UpdateChatAdmins do defstruct chat_id: nil, enabled: nil, version: nil end | |
defmodule UpdateChatParticipantAdmin do defstruct chat_id: nil, user_id: nil, is_admin: nil, version: nil end | |
defmodule UpdateNewStickerSet do defstruct stickerset: nil end | |
defmodule UpdateStickerSetsOrder do defstruct flags: nil, masks: nil, order: [] end | |
defmodule UpdateStickerSets do defstruct [] end | |
defmodule UpdateSavedGifs do defstruct [] end | |
defmodule UpdateBotInlineQuery do defstruct flags: nil, query_id: nil, user_id: nil, query: nil, geo: nil, offset: nil end | |
defmodule UpdateBotInlineSend do defstruct flags: nil, user_id: nil, query: nil, geo: nil, id: nil, msg_id: nil end | |
defmodule UpdateEditChannelMessage do defstruct message: nil, pts: nil, pts_count: nil end | |
defmodule UpdateChannelPinnedMessage do defstruct channel_id: nil, id: nil end | |
defmodule UpdateBotCallbackQuery do defstruct flags: nil, query_id: nil, user_id: nil, peer: nil, msg_id: nil, chat_instance: nil, data: nil, game_short_name: nil end | |
defmodule UpdateEditMessage do defstruct message: nil, pts: nil, pts_count: nil end | |
defmodule UpdateInlineBotCallbackQuery do defstruct flags: nil, query_id: nil, user_id: nil, msg_id: nil, chat_instance: nil, data: nil, game_short_name: nil end | |
defmodule UpdateReadChannelOutbox do defstruct channel_id: nil, max_id: nil end | |
defmodule UpdateDraftMessage do defstruct peer: nil, draft: nil end | |
defmodule UpdateReadFeaturedStickers do defstruct [] end | |
defmodule UpdateRecentStickers do defstruct [] end | |
defmodule UpdateConfig do defstruct [] end | |
defmodule UpdatePtsChanged do defstruct [] end | |
defmodule UpdateChannelWebPage do defstruct channel_id: nil, webpage: nil, pts: nil, pts_count: nil end | |
defmodule UpdatePhoneCall do defstruct phone_call: nil end | |
defmodule UpdateDialogPinned do defstruct flags: nil, pinned: nil, peer: nil end | |
defmodule UpdatePinnedDialogs do defstruct flags: nil, order: [] end | |
defmodule Updates.State do defstruct pts: nil, qts: nil, date: nil, seq: nil, unread_count: nil end | |
defmodule Updates.DifferenceEmpty do defstruct date: nil, seq: nil end | |
defmodule Updates.Difference do defstruct new_messages: [], new_encrypted_messages: [], other_updates: [], chats: [], users: [], state: nil end | |
defmodule Updates.DifferenceSlice do defstruct new_messages: [], new_encrypted_messages: [], other_updates: [], chats: [], users: [], intermediate_state: nil end | |
defmodule Updates.DifferenceTooLong do defstruct pts: nil end | |
defmodule UpdatesTooLong do defstruct [] end | |
defmodule UpdateShortMessage do defstruct flags: nil, out: nil, mentioned: nil, media_unread: nil, silent: nil, id: nil, user_id: nil, message: nil, pts: nil, pts_count: nil, date: nil, fwd_from: nil, via_bot_id: nil, reply_to_msg_id: nil, entities: [] end | |
defmodule UpdateShortChatMessage do defstruct flags: nil, out: nil, mentioned: nil, media_unread: nil, silent: nil, id: nil, from_id: nil, chat_id: nil, message: nil, pts: nil, pts_count: nil, date: nil, fwd_from: nil, via_bot_id: nil, reply_to_msg_id: nil, entities: [] end | |
defmodule UpdateShort do defstruct update: nil, date: nil end | |
defmodule UpdatesCombined do defstruct updates: [], users: [], chats: [], date: nil, seq_start: nil, seq: nil end | |
defmodule Updates do defstruct updates: [], users: [], chats: [], date: nil, seq: nil end | |
defmodule UpdateShortSentMessage do defstruct flags: nil, out: nil, id: nil, pts: nil, pts_count: nil, date: nil, media: nil, entities: [] end | |
defmodule Photos.Photos do defstruct photos: [], users: [] end | |
defmodule Photos.PhotosSlice do defstruct count: nil, photos: [], users: [] end | |
defmodule Photos.Photo do defstruct photo: nil, users: [] end | |
defmodule Upload.File do defstruct type: nil, mtime: nil, bytes: nil end | |
defmodule DcOption do defstruct flags: nil, ipv6: nil, media_only: nil, tcpo_only: nil, id: nil, ip_address: nil, port: nil end | |
defmodule Config do defstruct flags: nil, phonecalls_enabled: nil, date: nil, expires: nil, test_mode: nil, this_dc: nil, dc_options: [], chat_size_max: nil, megagroup_size_max: nil, forwarded_count_max: nil, online_update_period_ms: nil, offline_blur_timeout_ms: nil, offline_idle_timeout_ms: nil, online_cloud_timeout_ms: nil, notify_cloud_delay_ms: nil, notify_default_delay_ms: nil, chat_big_size: nil, push_chat_period_ms: nil, push_chat_limit: nil, saved_gifs_limit: nil, edit_time_limit: nil, rating_e_decay: nil, stickers_recent_limit: nil, tmp_sessions: nil, pinned_dialogs_count_max: nil, call_receive_timeout_ms: nil, call_ring_timeout_ms: nil, call_connect_timeout_ms: nil, call_packet_timeout_ms: nil, disabled_features: [] end | |
defmodule NearestDc do defstruct country: nil, this_dc: nil, nearest_dc: nil end | |
defmodule Help.AppUpdate do defstruct id: nil, critical: nil, url: nil, text: nil end | |
defmodule Help.NoAppUpdate do defstruct [] end | |
defmodule Help.InviteText do defstruct message: nil end | |
defmodule EncryptedChatEmpty do defstruct id: nil end | |
defmodule EncryptedChatWaiting do defstruct id: nil, access_hash: nil, date: nil, admin_id: nil, participant_id: nil end | |
defmodule EncryptedChatRequested do defstruct id: nil, access_hash: nil, date: nil, admin_id: nil, participant_id: nil, g_a: nil end | |
defmodule EncryptedChat do defstruct id: nil, access_hash: nil, date: nil, admin_id: nil, participant_id: nil, g_a_or_b: nil, key_fingerprint: nil end | |
defmodule EncryptedChatDiscarded do defstruct id: nil end | |
defmodule InputEncryptedChat do defstruct chat_id: nil, access_hash: nil end | |
defmodule EncryptedFileEmpty do defstruct [] end | |
defmodule EncryptedFile do defstruct id: nil, access_hash: nil, size: nil, dc_id: nil, key_fingerprint: nil end | |
defmodule InputEncryptedFileEmpty do defstruct [] end | |
defmodule InputEncryptedFileUploaded do defstruct id: nil, parts: nil, md5_checksum: nil, key_fingerprint: nil end | |
defmodule InputEncryptedFile do defstruct id: nil, access_hash: nil end | |
defmodule InputEncryptedFileBigUploaded do defstruct id: nil, parts: nil, key_fingerprint: nil end | |
defmodule EncryptedMessage do defstruct random_id: nil, chat_id: nil, date: nil, bytes: nil, file: nil end | |
defmodule EncryptedMessageService do defstruct random_id: nil, chat_id: nil, date: nil, bytes: nil end | |
defmodule Messages.DhConfigNotModified do defstruct random: nil end | |
defmodule Messages.DhConfig do defstruct g: nil, p: nil, version: nil, random: nil end | |
defmodule Messages.SentEncryptedMessage do defstruct date: nil end | |
defmodule Messages.SentEncryptedFile do defstruct date: nil, file: nil end | |
defmodule InputDocumentEmpty do defstruct [] end | |
defmodule InputDocument do defstruct id: nil, access_hash: nil end | |
defmodule DocumentEmpty do defstruct id: nil end | |
defmodule Document do defstruct id: nil, access_hash: nil, date: nil, mime_type: nil, size: nil, thumb: nil, dc_id: nil, version: nil, attributes: [] end | |
defmodule Help.Support do defstruct phone_number: nil, user: nil end | |
defmodule NotifyPeer do defstruct peer: nil end | |
defmodule NotifyUsers do defstruct [] end | |
defmodule NotifyChats do defstruct [] end | |
defmodule NotifyAll do defstruct [] end | |
defmodule SendMessageTypingAction do defstruct [] end | |
defmodule SendMessageCancelAction do defstruct [] end | |
defmodule SendMessageRecordVideoAction do defstruct [] end | |
defmodule SendMessageUploadVideoAction do defstruct progress: nil end | |
defmodule SendMessageRecordAudioAction do defstruct [] end | |
defmodule SendMessageUploadAudioAction do defstruct progress: nil end | |
defmodule SendMessageUploadPhotoAction do defstruct progress: nil end | |
defmodule SendMessageUploadDocumentAction do defstruct progress: nil end | |
defmodule SendMessageGeoLocationAction do defstruct [] end | |
defmodule SendMessageChooseContactAction do defstruct [] end | |
defmodule SendMessageGamePlayAction do defstruct [] end | |
defmodule Contacts.Found do defstruct results: [], chats: [], users: [] end | |
defmodule InputPrivacyKeyStatusTimestamp do defstruct [] end | |
defmodule InputPrivacyKeyChatInvite do defstruct [] end | |
defmodule InputPrivacyKeyPhoneCall do defstruct [] end | |
defmodule PrivacyKeyStatusTimestamp do defstruct [] end | |
defmodule PrivacyKeyChatInvite do defstruct [] end | |
defmodule PrivacyKeyPhoneCall do defstruct [] end | |
defmodule InputPrivacyValueAllowContacts do defstruct [] end | |
defmodule InputPrivacyValueAllowAll do defstruct [] end | |
defmodule InputPrivacyValueAllowUsers do defstruct users: [] end | |
defmodule InputPrivacyValueDisallowContacts do defstruct [] end | |
defmodule InputPrivacyValueDisallowAll do defstruct [] end | |
defmodule InputPrivacyValueDisallowUsers do defstruct users: [] end | |
defmodule PrivacyValueAllowContacts do defstruct [] end | |
defmodule PrivacyValueAllowAll do defstruct [] end | |
defmodule PrivacyValueAllowUsers do defstruct users: [] end | |
defmodule PrivacyValueDisallowContacts do defstruct [] end | |
defmodule PrivacyValueDisallowAll do defstruct [] end | |
defmodule PrivacyValueDisallowUsers do defstruct users: [] end | |
defmodule Account.PrivacyRules do defstruct rules: [], users: [] end | |
defmodule AccountDaysTTL do defstruct days: nil end | |
defmodule DocumentAttributeImageSize do defstruct w: nil, h: nil end | |
defmodule DocumentAttributeAnimated do defstruct [] end | |
defmodule DocumentAttributeSticker do defstruct flags: nil, mask: nil, alt: nil, stickerset: nil, mask_coords: nil end | |
defmodule DocumentAttributeVideo do defstruct duration: nil, w: nil, h: nil end | |
defmodule DocumentAttributeAudio do defstruct flags: nil, voice: nil, duration: nil, title: nil, performer: nil, waveform: nil end | |
defmodule DocumentAttributeFilename do defstruct file_name: nil end | |
defmodule DocumentAttributeHasStickers do defstruct [] end | |
defmodule Messages.StickersNotModified do defstruct [] end | |
defmodule Messages.Stickers do defstruct hash: nil, stickers: [] end | |
defmodule StickerPack do defstruct emoticon: nil, documents: [] end | |
defmodule Messages.AllStickersNotModified do defstruct [] end | |
defmodule Messages.AllStickers do defstruct hash: nil, sets: [] end | |
defmodule DisabledFeature do defstruct feature: nil, description: nil end | |
defmodule Messages.AffectedMessages do defstruct pts: nil, pts_count: nil end | |
defmodule ContactLinkUnknown do defstruct [] end | |
defmodule ContactLinkNone do defstruct [] end | |
defmodule ContactLinkHasPhone do defstruct [] end | |
defmodule ContactLinkContact do defstruct [] end | |
defmodule WebPageEmpty do defstruct id: nil end | |
defmodule WebPagePending do defstruct id: nil, date: nil end | |
defmodule WebPage do defstruct flags: nil, id: nil, url: nil, display_url: nil, hash: nil, type: nil, site_name: nil, title: nil, description: nil, photo: nil, embed_url: nil, embed_type: nil, embed_width: nil, embed_height: nil, duration: nil, author: nil, document: nil, cached_page: nil end | |
defmodule WebPageNotModified do defstruct [] end | |
defmodule Authorization do defstruct hash: nil, flags: nil, device_model: nil, platform: nil, system_version: nil, api_id: nil, app_name: nil, app_version: nil, date_created: nil, date_active: nil, ip: nil, country: nil, region: nil end | |
defmodule Account.Authorizations do defstruct authorizations: [] end | |
defmodule Account.NoPassword do defstruct new_salt: nil, email_unconfirmed_pattern: nil end | |
defmodule Account.Password do defstruct current_salt: nil, new_salt: nil, hint: nil, has_recovery: nil, email_unconfirmed_pattern: nil end | |
defmodule Account.PasswordSettings do defstruct email: nil end | |
defmodule Account.PasswordInputSettings do defstruct flags: nil, new_salt: nil, new_password_hash: nil, hint: nil, email: nil end | |
defmodule Auth.PasswordRecovery do defstruct email_pattern: nil end | |
defmodule ReceivedNotifyMessage do defstruct id: nil, flags: nil end | |
defmodule ChatInviteEmpty do defstruct [] end | |
defmodule ChatInviteExported do defstruct link: nil end | |
defmodule ChatInviteAlready do defstruct chat: nil end | |
defmodule ChatInvite do defstruct flags: nil, channel: nil, broadcast: nil, public: nil, megagroup: nil, title: nil, photo: nil, participants_count: nil, participants: [] end | |
defmodule InputStickerSetEmpty do defstruct [] end | |
defmodule InputStickerSetID do defstruct id: nil, access_hash: nil end | |
defmodule InputStickerSetShortName do defstruct short_name: nil end | |
defmodule StickerSet do defstruct flags: nil, installed: nil, archived: nil, official: nil, masks: nil, id: nil, access_hash: nil, title: nil, short_name: nil, count: nil, hash: nil end | |
defmodule Messages.StickerSet do defstruct set: nil, packs: [], documents: [] end | |
defmodule BotCommand do defstruct command: nil, description: nil end | |
defmodule BotInfo do defstruct user_id: nil, description: nil, commands: [] end | |
defmodule KeyboardButton do defstruct text: nil end | |
defmodule KeyboardButtonUrl do defstruct text: nil, url: nil end | |
defmodule KeyboardButtonCallback do defstruct text: nil, data: nil end | |
defmodule KeyboardButtonRequestPhone do defstruct text: nil end | |
defmodule KeyboardButtonRequestGeoLocation do defstruct text: nil end | |
defmodule KeyboardButtonSwitchInline do defstruct flags: nil, same_peer: nil, text: nil, query: nil end | |
defmodule KeyboardButtonGame do defstruct text: nil end | |
defmodule KeyboardButtonRow do defstruct buttons: [] end | |
defmodule ReplyKeyboardHide do defstruct flags: nil, selective: nil end | |
defmodule ReplyKeyboardForceReply do defstruct flags: nil, single_use: nil, selective: nil end | |
defmodule ReplyKeyboardMarkup do defstruct flags: nil, resize: nil, single_use: nil, selective: nil, rows: [] end | |
defmodule ReplyInlineMarkup do defstruct rows: [] end | |
defmodule Help.AppChangelogEmpty do defstruct [] end | |
defmodule Help.AppChangelog do defstruct message: nil, media: nil, entities: [] end | |
defmodule MessageEntityUnknown do defstruct offset: nil, length: nil end | |
defmodule MessageEntityMention do defstruct offset: nil, length: nil end | |
defmodule MessageEntityHashtag do defstruct offset: nil, length: nil end | |
defmodule MessageEntityBotCommand do defstruct offset: nil, length: nil end | |
defmodule MessageEntityUrl do defstruct offset: nil, length: nil end | |
defmodule MessageEntityEmail do defstruct offset: nil, length: nil end | |
defmodule MessageEntityBold do defstruct offset: nil, length: nil end | |
defmodule MessageEntityItalic do defstruct offset: nil, length: nil end | |
defmodule MessageEntityCode do defstruct offset: nil, length: nil end | |
defmodule MessageEntityPre do defstruct offset: nil, length: nil, language: nil end | |
defmodule MessageEntityTextUrl do defstruct offset: nil, length: nil, url: nil end | |
defmodule MessageEntityMentionName do defstruct offset: nil, length: nil, user_id: nil end | |
defmodule InputMessageEntityMentionName do defstruct offset: nil, length: nil, user_id: nil end | |
defmodule InputChannelEmpty do defstruct [] end | |
defmodule InputChannel do defstruct channel_id: nil, access_hash: nil end | |
defmodule Contacts.ResolvedPeer do defstruct peer: nil, chats: [], users: [] end | |
defmodule MessageRange do defstruct min_id: nil, max_id: nil end | |
defmodule Updates.ChannelDifferenceEmpty do defstruct flags: nil, final: nil, pts: nil, timeout: nil end | |
defmodule Updates.ChannelDifferenceTooLong do defstruct flags: nil, final: nil, pts: nil, timeout: nil, top_message: nil, read_inbox_max_id: nil, read_outbox_max_id: nil, unread_count: nil, messages: [], chats: [], users: [] end | |
defmodule Updates.ChannelDifference do defstruct flags: nil, final: nil, pts: nil, timeout: nil, new_messages: [], other_updates: [], chats: [], users: [] end | |
defmodule ChannelMessagesFilterEmpty do defstruct [] end | |
defmodule ChannelMessagesFilter do defstruct flags: nil, exclude_new_messages: nil, ranges: [] end | |
defmodule ChannelParticipant do defstruct user_id: nil, date: nil end | |
defmodule ChannelParticipantSelf do defstruct user_id: nil, inviter_id: nil, date: nil end | |
defmodule ChannelParticipantModerator do defstruct user_id: nil, inviter_id: nil, date: nil end | |
defmodule ChannelParticipantEditor do defstruct user_id: nil, inviter_id: nil, date: nil end | |
defmodule ChannelParticipantKicked do defstruct user_id: nil, kicked_by: nil, date: nil end | |
defmodule ChannelParticipantCreator do defstruct user_id: nil end | |
defmodule ChannelParticipantsRecent do defstruct [] end | |
defmodule ChannelParticipantsAdmins do defstruct [] end | |
defmodule ChannelParticipantsKicked do defstruct [] end | |
defmodule ChannelParticipantsBots do defstruct [] end | |
defmodule ChannelRoleEmpty do defstruct [] end | |
defmodule ChannelRoleModerator do defstruct [] end | |
defmodule ChannelRoleEditor do defstruct [] end | |
defmodule Channels.ChannelParticipants do defstruct count: nil, participants: [], users: [] end | |
defmodule Channels.ChannelParticipant do defstruct participant: nil, users: [] end | |
defmodule Help.TermsOfService do defstruct text: nil end | |
defmodule FoundGif do defstruct url: nil, thumb_url: nil, content_url: nil, content_type: nil, w: nil, h: nil end | |
defmodule FoundGifCached do defstruct url: nil, photo: nil, document: nil end | |
defmodule Messages.FoundGifs do defstruct next_offset: nil, results: [] end | |
defmodule Messages.SavedGifsNotModified do defstruct [] end | |
defmodule Messages.SavedGifs do defstruct hash: nil, gifs: [] end | |
defmodule InputBotInlineMessageMediaAuto do defstruct flags: nil, caption: nil, reply_markup: nil end | |
defmodule InputBotInlineMessageText do defstruct flags: nil, no_webpage: nil, message: nil, entities: [], reply_markup: nil end | |
defmodule InputBotInlineMessageMediaGeo do defstruct flags: nil, geo_point: nil, reply_markup: nil end | |
defmodule InputBotInlineMessageMediaVenue do defstruct flags: nil, geo_point: nil, title: nil, address: nil, provider: nil, venue_id: nil, reply_markup: nil end | |
defmodule InputBotInlineMessageMediaContact do defstruct flags: nil, phone_number: nil, first_name: nil, last_name: nil, reply_markup: nil end | |
defmodule InputBotInlineMessageGame do defstruct flags: nil, reply_markup: nil end | |
defmodule InputBotInlineResult do defstruct flags: nil, id: nil, type: nil, title: nil, description: nil, url: nil, thumb_url: nil, content_url: nil, content_type: nil, w: nil, h: nil, duration: nil, send_message: nil end | |
defmodule InputBotInlineResultPhoto do defstruct id: nil, type: nil, photo: nil, send_message: nil end | |
defmodule InputBotInlineResultDocument do defstruct flags: nil, id: nil, type: nil, title: nil, description: nil, document: nil, send_message: nil end | |
defmodule InputBotInlineResultGame do defstruct id: nil, short_name: nil, send_message: nil end | |
defmodule BotInlineMessageMediaAuto do defstruct flags: nil, caption: nil, reply_markup: nil end | |
defmodule BotInlineMessageText do defstruct flags: nil, no_webpage: nil, message: nil, entities: [], reply_markup: nil end | |
defmodule BotInlineMessageMediaGeo do defstruct flags: nil, geo: nil, reply_markup: nil end | |
defmodule BotInlineMessageMediaVenue do defstruct flags: nil, geo: nil, title: nil, address: nil, provider: nil, venue_id: nil, reply_markup: nil end | |
defmodule BotInlineMessageMediaContact do defstruct flags: nil, phone_number: nil, first_name: nil, last_name: nil, reply_markup: nil end | |
defmodule BotInlineResult do defstruct flags: nil, id: nil, type: nil, title: nil, description: nil, url: nil, thumb_url: nil, content_url: nil, content_type: nil, w: nil, h: nil, duration: nil, send_message: nil end | |
defmodule BotInlineMediaResult do defstruct flags: nil, id: nil, type: nil, photo: nil, document: nil, title: nil, description: nil, send_message: nil end | |
defmodule Messages.BotResults do defstruct flags: nil, gallery: nil, query_id: nil, next_offset: nil, switch_pm: nil, results: [], cache_time: nil end | |
defmodule ExportedMessageLink do defstruct link: nil end | |
defmodule MessageFwdHeader do defstruct flags: nil, from_id: nil, date: nil, channel_id: nil, channel_post: nil end | |
defmodule Auth.CodeTypeSms do defstruct [] end | |
defmodule Auth.CodeTypeCall do defstruct [] end | |
defmodule Auth.CodeTypeFlashCall do defstruct [] end | |
defmodule Auth.SentCodeTypeApp do defstruct length: nil end | |
defmodule Auth.SentCodeTypeSms do defstruct length: nil end | |
defmodule Auth.SentCodeTypeCall do defstruct length: nil end | |
defmodule Auth.SentCodeTypeFlashCall do defstruct pattern: nil end | |
defmodule Messages.BotCallbackAnswer do defstruct flags: nil, alert: nil, has_url: nil, message: nil, url: nil, cache_time: nil end | |
defmodule Messages.MessageEditData do defstruct flags: nil, caption: nil end | |
defmodule InputBotInlineMessageID do defstruct dc_id: nil, id: nil, access_hash: nil end | |
defmodule InlineBotSwitchPM do defstruct text: nil, start_param: nil end | |
defmodule Messages.PeerDialogs do defstruct dialogs: [], messages: [], chats: [], users: [], state: nil end | |
defmodule TopPeer do defstruct peer: nil, rating: nil end | |
defmodule TopPeerCategoryBotsPM do defstruct [] end | |
defmodule TopPeerCategoryBotsInline do defstruct [] end | |
defmodule TopPeerCategoryCorrespondents do defstruct [] end | |
defmodule TopPeerCategoryGroups do defstruct [] end | |
defmodule TopPeerCategoryChannels do defstruct [] end | |
defmodule TopPeerCategoryPeers do defstruct category: nil, count: nil, peers: [] end | |
defmodule Contacts.TopPeersNotModified do defstruct [] end | |
defmodule Contacts.TopPeers do defstruct categories: [], chats: [], users: [] end | |
defmodule DraftMessageEmpty do defstruct [] end | |
defmodule DraftMessage do defstruct flags: nil, no_webpage: nil, reply_to_msg_id: nil, message: nil, entities: [], date: nil end | |
defmodule Messages.FeaturedStickersNotModified do defstruct [] end | |
defmodule Messages.FeaturedStickers do defstruct hash: nil, sets: [], unread: [] end | |
defmodule Messages.RecentStickersNotModified do defstruct [] end | |
defmodule Messages.RecentStickers do defstruct hash: nil, stickers: [] end | |
defmodule Messages.ArchivedStickers do defstruct count: nil, sets: [] end | |
defmodule Messages.StickerSetInstallResultSuccess do defstruct [] end | |
defmodule Messages.StickerSetInstallResultArchive do defstruct sets: [] end | |
defmodule StickerSetCovered do defstruct set: nil, cover: nil end | |
defmodule StickerSetMultiCovered do defstruct set: nil, covers: [] end | |
defmodule MaskCoords do defstruct n: nil, x: nil, y: nil, zoom: nil end | |
defmodule InputStickeredMediaPhoto do defstruct id: nil end | |
defmodule InputStickeredMediaDocument do defstruct id: nil end | |
defmodule Game do defstruct flags: nil, id: nil, access_hash: nil, short_name: nil, title: nil, description: nil, photo: nil, document: nil end | |
defmodule InputGameID do defstruct id: nil, access_hash: nil end | |
defmodule InputGameShortName do defstruct bot_id: nil, short_name: nil end | |
defmodule HighScore do defstruct pos: nil, user_id: nil, score: nil end | |
defmodule Messages.HighScores do defstruct scores: [], users: [] end | |
defmodule TextEmpty do defstruct [] end | |
defmodule TextPlain do defstruct text: nil end | |
defmodule TextBold do defstruct text: nil end | |
defmodule TextItalic do defstruct text: nil end | |
defmodule TextUnderline do defstruct text: nil end | |
defmodule TextStrike do defstruct text: nil end | |
defmodule TextFixed do defstruct text: nil end | |
defmodule TextUrl do defstruct text: nil, url: nil, webpage_id: nil end | |
defmodule TextEmail do defstruct text: nil, email: nil end | |
defmodule TextConcat do defstruct texts: [] end | |
defmodule PageBlockUnsupported do defstruct [] end | |
defmodule PageBlockTitle do defstruct text: nil end | |
defmodule PageBlockSubtitle do defstruct text: nil end | |
defmodule PageBlockAuthorDate do defstruct author: nil, published_date: nil end | |
defmodule PageBlockHeader do defstruct text: nil end | |
defmodule PageBlockSubheader do defstruct text: nil end | |
defmodule PageBlockParagraph do defstruct text: nil end | |
defmodule PageBlockPreformatted do defstruct text: nil, language: nil end | |
defmodule PageBlockFooter do defstruct text: nil end | |
defmodule PageBlockDivider do defstruct [] end | |
defmodule PageBlockAnchor do defstruct name: nil end | |
defmodule PageBlockList do defstruct ordered: nil, items: [] end | |
defmodule PageBlockBlockquote do defstruct text: nil, caption: nil end | |
defmodule PageBlockPullquote do defstruct text: nil, caption: nil end | |
defmodule PageBlockPhoto do defstruct photo_id: nil, caption: nil end | |
defmodule PageBlockVideo do defstruct flags: nil, autoplay: nil, loop: nil, video_id: nil, caption: nil end | |
defmodule PageBlockCover do defstruct cover: nil end | |
defmodule PageBlockEmbed do defstruct flags: nil, full_width: nil, allow_scrolling: nil, url: nil, html: nil, poster_photo_id: nil, w: nil, h: nil, caption: nil end | |
defmodule PageBlockEmbedPost do defstruct url: nil, webpage_id: nil, author_photo_id: nil, author: nil, date: nil, blocks: [], caption: nil end | |
defmodule PageBlockCollage do defstruct items: [], caption: nil end | |
defmodule PageBlockSlideshow do defstruct items: [], caption: nil end | |
defmodule PagePart do defstruct blocks: [], photos: [], videos: [] end | |
defmodule PageFull do defstruct blocks: [], photos: [], videos: [] end | |
defmodule InputPhoneCall do defstruct id: nil, access_hash: nil end | |
defmodule PhoneCallEmpty do defstruct id: nil end | |
defmodule PhoneCallWaiting do defstruct flags: nil, id: nil, access_hash: nil, date: nil, admin_id: nil, participant_id: nil, protocol: nil, receive_date: nil end | |
defmodule PhoneCallRequested do defstruct id: nil, access_hash: nil, date: nil, admin_id: nil, participant_id: nil, g_a: nil, protocol: nil end | |
defmodule PhoneCall do defstruct id: nil, access_hash: nil, date: nil, admin_id: nil, participant_id: nil, g_a_or_b: nil, key_fingerprint: nil, protocol: nil, connection: nil, alternative_connections: [], start_date: nil end | |
defmodule PhoneCallDiscarded do defstruct flags: nil, id: nil, reason: nil, duration: nil end | |
defmodule PhoneConnection do defstruct id: nil, ip: nil, ipv6: nil, port: nil, peer_tag: nil end | |
defmodule PhoneCallProtocol do defstruct flags: nil, udp_p2p: nil, udp_reflector: nil, min_layer: nil, max_layer: nil end | |
defmodule Phone.PhoneCall do defstruct phone_call: nil, users: [] end | |
defmodule PhoneCallDiscardReasonMissed do defstruct [] end | |
defmodule PhoneCallDiscardReasonDisconnect do defstruct [] end | |
defmodule PhoneCallDiscardReasonHangup do defstruct [] end | |
defmodule PhoneCallDiscardReasonBusy do defstruct [] end | |
defmodule Unknown do defstruct [] end | |
# Encoders | |
def encode(true), do: <<55, 151, 121, 188>> #0xBC799737 | |
def encode(false), do: <<181, 117, 114, 153>> #0x997275B5 | |
def encode(%ResPQ{} = x), do: <<99, 36, 22, 5, encode(:Int128, x.nonce)::binary, encode(:Int128, x.server_nonce)::binary, encode(:String, x.pq)::binary, enc_v(:Long, x.server_public_key_fingerprints)::binary>> | |
def encode(%P_Q_Inner_Data{} = x), do: <<236, 90, 201, 131, encode(:String, x.pq)::binary, encode(:String, x.p)::binary, encode(:String, x.q)::binary, encode(:Int128, x.nonce)::binary, encode(:Int128, x.server_nonce)::binary, encode(:Int256, x.new_nonce)::binary>> | |
def encode(%Server_DH_Params_Fail{} = x), do: <<93, 4, 203, 121, encode(:Int128, x.nonce)::binary, encode(:Int128, x.server_nonce)::binary, encode(:Int128, x.new_nonce_hash)::binary>> | |
def encode(%Server_DH_Params_Ok{} = x), do: <<92, 7, 232, 208, encode(:Int128, x.nonce)::binary, encode(:Int128, x.server_nonce)::binary, encode(:String, x.encrypted_answer)::binary>> | |
def encode(%Server_DH_Inner_Data{} = x), do: <<186, 13, 137, 181, encode(:Int128, x.nonce)::binary, encode(:Int128, x.server_nonce)::binary, encode(:Int, x.g)::binary, encode(:String, x.dh_prime)::binary, encode(:String, x.g_a)::binary, encode(:Int, x.server_time)::binary>> | |
def encode(%Client_DH_Inner_Data{} = x), do: <<84, 182, 67, 102, encode(:Int128, x.nonce)::binary, encode(:Int128, x.server_nonce)::binary, encode(:Long, x.retry_id)::binary, encode(:String, x.g_b)::binary>> | |
def encode(%Dh_Gen_Ok{} = x), do: <<52, 247, 203, 59, encode(:Int128, x.nonce)::binary, encode(:Int128, x.server_nonce)::binary, encode(:Int128, x.new_nonce_hash1)::binary>> | |
def encode(%Dh_Gen_Retry{} = x), do: <<185, 31, 220, 70, encode(:Int128, x.nonce)::binary, encode(:Int128, x.server_nonce)::binary, encode(:Int128, x.new_nonce_hash2)::binary>> | |
def encode(%Dh_Gen_Fail{} = x), do: <<2, 174, 157, 166, encode(:Int128, x.nonce)::binary, encode(:Int128, x.server_nonce)::binary, encode(:Int128, x.new_nonce_hash3)::binary>> | |
def encode(%Msgs_Ack{} = x), do: <<89, 180, 214, 98, enc_v(:Long, x.msg_ids)::binary>> | |
def encode(%Bad_Msg_Notification{} = x), do: <<17, 248, 239, 167, encode(:Long, x.bad_msg_id)::binary, encode(:Int, x.bad_msg_seqno)::binary, encode(:Int, x.error_code)::binary>> | |
def encode(%Bad_Server_Salt{} = x), do: <<123, 68, 171, 237, encode(:Long, x.bad_msg_id)::binary, encode(:Int, x.bad_msg_seqno)::binary, encode(:Int, x.error_code)::binary, encode(:Long, x.new_server_salt)::binary>> | |
def encode(%Msgs_State_Req{} = x), do: <<82, 251, 105, 218, enc_v(:Long, x.msg_ids)::binary>> | |
def encode(%Msgs_State_Info{} = x), do: <<125, 181, 222, 4, encode(:Long, x.req_msg_id)::binary, encode(:String, x.info)::binary>> | |
def encode(%Msgs_All_Info{} = x), do: <<49, 209, 192, 140, enc_v(:Long, x.msg_ids)::binary, encode(:String, x.info)::binary>> | |
def encode(%Msg_Detailed_Info{} = x), do: <<198, 62, 109, 39, encode(:Long, x.msg_id)::binary, encode(:Long, x.answer_msg_id)::binary, encode(:Int, x.bytes)::binary, encode(:Int, x.status)::binary>> | |
def encode(%Msg_New_Detailed_Info{} = x), do: <<223, 182, 157, 128, encode(:Long, x.answer_msg_id)::binary, encode(:Int, x.bytes)::binary, encode(:Int, x.status)::binary>> | |
def encode(%Msg_Resend_Req{} = x), do: <<8, 26, 134, 125, enc_v(:Long, x.msg_ids)::binary>> | |
def encode(%Rpc_Result{} = x), do: <<1, 109, 92, 243, encode(:Long, x.req_msg_id)::binary, encode(x.result)::binary>> | |
def encode(%Rpc_Error{} = x), do: <<25, 202, 68, 33, encode(:Int, x.error_code)::binary, encode(:String, x.error_message)::binary>> | |
def encode(%Rpc_Answer_Unknown{}), do: <<110, 211, 42, 94>> | |
def encode(%Rpc_Answer_Dropped_Running{}), do: <<134, 229, 120, 205>> | |
def encode(%Rpc_Answer_Dropped{} = x), do: <<183, 216, 58, 164, encode(:Long, x.msg_id)::binary, encode(:Int, x.seq_no)::binary, encode(:Int, x.bytes)::binary>> | |
def encode(%Future_Salt{} = x), do: <<220, 217, 73, 9, encode(:Int, x.valid_since)::binary, encode(:Int, x.valid_until)::binary, encode(:Long, x.salt)::binary>> | |
def encode(%Future_Salts{} = x), do: <<149, 8, 80, 174, encode(:Long, x.req_msg_id)::binary, encode(:Int, x.now)::binary, enc_v(x.salts)::binary>> | |
def encode(%Pong{} = x), do: <<197, 115, 119, 52, encode(:Long, x.msg_id)::binary, encode(:Long, x.ping_id)::binary>> | |
def encode(%Destroy_Session_Ok{} = x), do: <<252, 69, 32, 226, encode(:Long, x.session_id)::binary>> | |
def encode(%Destroy_Session_None{} = x), do: <<201, 80, 211, 98, encode(:Long, x.session_id)::binary>> | |
def encode(%New_Session_Created{} = x), do: <<8, 9, 194, 158, encode(:Long, x.first_msg_id)::binary, encode(:Long, x.unique_id)::binary, encode(:Long, x.server_salt)::binary>> | |
def encode(%Gzip_Packed{} = x), do: <<161, 207, 114, 48, encode(:String, x.packed_data)::binary>> | |
def encode(%Http_Wait{} = x), do: <<159, 53, 153, 146, encode(:Int, x.max_delay)::binary, encode(:Int, x.wait_after)::binary, encode(:Int, x.max_wait)::binary>> | |
def encode(%BoolFalse{}), do: <<55, 151, 121, 188>> | |
def encode(%BoolTrue{}), do: <<181, 117, 114, 153>> | |
def encode(%True{}), do: <<57, 211, 237, 63>> | |
def encode(%Error{} = x), do: <<187, 249, 185, 196, encode(:Int, x.code)::binary, encode(:String, x.text)::binary>> | |
def encode(%Null{}), do: <<204, 11, 115, 86>> | |
def encode(%InputPeerEmpty{}), do: <<234, 24, 59, 127>> | |
def encode(%InputPeerSelf{}), do: <<201, 126, 160, 125>> | |
def encode(%InputPeerChat{} = x), do: <<99, 232, 155, 23, encode(:Int, x.chat_id)::binary>> | |
def encode(%InputPeerUser{} = x), do: <<230, 125, 142, 123, encode(:Int, x.user_id)::binary, encode(:Long, x.access_hash)::binary>> | |
def encode(%InputPeerChannel{} = x), do: <<248, 174, 173, 32, encode(:Int, x.channel_id)::binary, encode(:Long, x.access_hash)::binary>> | |
def encode(%InputUserEmpty{}), do: <<207, 134, 136, 185>> | |
def encode(%InputUserSelf{}), do: <<63, 177, 193, 247>> | |
def encode(%InputUser{} = x), do: <<22, 40, 41, 216, encode(:Int, x.user_id)::binary, encode(:Long, x.access_hash)::binary>> | |
def encode(%InputPhoneContact{} = x), do: <<244, 183, 146, 243, encode(:Long, x.client_id)::binary, encode(:String, x.phone)::binary, encode(:String, x.first_name)::binary, encode(:String, x.last_name)::binary>> | |
def encode(%InputFile{} = x), do: <<127, 242, 47, 245, encode(:Long, x.id)::binary, encode(:Int, x.parts)::binary, encode(:String, x.name)::binary, encode(:String, x.md5_checksum)::binary>> | |
def encode(%InputFileBig{} = x), do: <<181, 11, 79, 250, encode(:Long, x.id)::binary, encode(:Int, x.parts)::binary, encode(:String, x.name)::binary>> | |
def encode(%InputMediaEmpty{}), do: <<127, 245, 100, 150>> | |
def encode(%InputMediaUploadedPhoto{} = x), do: <<241, 154, 12, 99, encode(:Int, x.flags)::binary, encode(x.file)::binary, encode(:String, x.caption)::binary, enc_vf(x.stickers, x.flags, 1)::binary>> | |
def encode(%InputMediaPhoto{} = x), do: <<243, 180, 191, 233, encode(x.id)::binary, encode(:String, x.caption)::binary>> | |
def encode(%InputMediaGeoPoint{} = x), do: <<68, 65, 196, 249, encode(x.geo_point)::binary>> | |
def encode(%InputMediaContact{} = x), do: <<135, 89, 228, 166, encode(:String, x.phone_number)::binary, encode(:String, x.first_name)::binary, encode(:String, x.last_name)::binary>> | |
def encode(%InputMediaUploadedDocument{} = x), do: <<233, 241, 112, 208, encode(:Int, x.flags)::binary, encode(x.file)::binary, encode(:String, x.mime_type)::binary, enc_v(x.attributes)::binary, encode(:String, x.caption)::binary, enc_vf(x.stickers, x.flags, 1)::binary>> | |
def encode(%InputMediaUploadedThumbDocument{} = x), do: <<174, 140, 216, 80, encode(:Int, x.flags)::binary, encode(x.file)::binary, encode(x.thumb)::binary, encode(:String, x.mime_type)::binary, enc_v(x.attributes)::binary, encode(:String, x.caption)::binary, enc_vf(x.stickers, x.flags, 1)::binary>> | |
def encode(%InputMediaDocument{} = x), do: <<156, 242, 119, 26, encode(x.id)::binary, encode(:String, x.caption)::binary>> | |
def encode(%InputMediaVenue{} = x), do: <<26, 168, 39, 40, encode(x.geo_point)::binary, encode(:String, x.title)::binary, encode(:String, x.address)::binary, encode(:String, x.provider)::binary, encode(:String, x.venue_id)::binary>> | |
def encode(%InputMediaGifExternal{} = x), do: <<253, 176, 67, 72, encode(:String, x.url)::binary, encode(:String, x.q)::binary>> | |
def encode(%InputMediaPhotoExternal{} = x), do: <<24, 79, 95, 181, encode(:String, x.url)::binary, encode(:String, x.caption)::binary>> | |
def encode(%InputMediaDocumentExternal{} = x), do: <<124, 96, 233, 229, encode(:String, x.url)::binary, encode(:String, x.caption)::binary>> | |
def encode(%InputMediaGame{} = x), do: <<243, 67, 63, 211, encode(x.id)::binary>> | |
def encode(%InputChatPhotoEmpty{}), do: <<87, 143, 164, 28>> | |
def encode(%InputChatUploadedPhoto{} = x), do: <<180, 85, 124, 146, encode(x.file)::binary>> | |
def encode(%InputChatPhoto{} = x), do: <<55, 173, 83, 137, encode(x.id)::binary>> | |
def encode(%InputGeoPointEmpty{}), do: <<214, 35, 193, 228>> | |
def encode(%InputGeoPoint{} = x), do: <<201, 172, 183, 243, encode(:Double, x.lat)::binary, encode(:Double, x.long)::binary>> | |
def encode(%InputPhotoEmpty{}), do: <<13, 191, 215, 28>> | |
def encode(%InputPhoto{} = x), do: <<196, 198, 149, 251, encode(:Long, x.id)::binary, encode(:Long, x.access_hash)::binary>> | |
def encode(%InputFileLocation{} = x), do: <<150, 113, 99, 20, encode(:Long, x.volume_id)::binary, encode(:Int, x.local_id)::binary, encode(:Long, x.secret)::binary>> | |
def encode(%InputEncryptedFileLocation{} = x), do: <<85, 93, 35, 245, encode(:Long, x.id)::binary, encode(:Long, x.access_hash)::binary>> | |
def encode(%InputDocumentFileLocation{} = x), do: <<36, 7, 15, 67, encode(:Long, x.id)::binary, encode(:Long, x.access_hash)::binary, encode(:Int, x.version)::binary>> | |
def encode(%InputAppEvent{} = x), do: <<168, 86, 6, 119, encode(:Double, x.time)::binary, encode(:String, x.type)::binary, encode(:Long, x.peer)::binary, encode(:String, x.data)::binary>> | |
def encode(%PeerUser{} = x), do: <<109, 188, 177, 157, encode(:Int, x.user_id)::binary>> | |
def encode(%PeerChat{} = x), do: <<187, 229, 208, 186, encode(:Int, x.chat_id)::binary>> | |
def encode(%PeerChannel{} = x), do: <<50, 229, 221, 189, encode(:Int, x.channel_id)::binary>> | |
def encode(%Storage.FileUnknown{}), do: <<5, 59, 150, 170>> | |
def encode(%Storage.FileJpeg{}), do: <<14, 254, 126, 0>> | |
def encode(%Storage.FileGif{}), do: <<223, 170, 225, 202>> | |
def encode(%Storage.FilePng{}), do: <<192, 99, 79, 10>> | |
def encode(%Storage.FilePdf{}), do: <<141, 80, 30, 174>> | |
def encode(%Storage.FileMp3{}), do: <<119, 6, 138, 82>> | |
def encode(%Storage.FileMov{}), do: <<188, 235, 9, 75>> | |
def encode(%Storage.FilePartial{}), do: <<82, 111, 188, 64>> | |
def encode(%Storage.FileMp4{}), do: <<228, 160, 206, 179>> | |
def encode(%Storage.FileWebp{}), do: <<76, 70, 129, 16>> | |
def encode(%FileLocationUnavailable{} = x), do: <<70, 107, 89, 124, encode(:Long, x.volume_id)::binary, encode(:Int, x.local_id)::binary, encode(:Long, x.secret)::binary>> | |
def encode(%FileLocation{} = x), do: <<118, 144, 214, 83, encode(:Int, x.dc_id)::binary, encode(:Long, x.volume_id)::binary, encode(:Int, x.local_id)::binary, encode(:Long, x.secret)::binary>> | |
def encode(%UserEmpty{} = x), do: <<186, 80, 2, 32, encode(:Int, x.id)::binary>> | |
def encode(%User{} = x), do: <<154, 151, 13, 209, encode(:Int, x.flags)::binary, enc_f(:True, x.self, x.flags, 1024)::binary, enc_f(:True, x.contact, x.flags, 2048)::binary, enc_f(:True, x.mutual_contact, x.flags, 4096)::binary, enc_f(:True, x.deleted, x.flags, 8192)::binary, enc_f(:True, x.bot, x.flags, 16384)::binary, enc_f(:True, x.bot_chat_history, x.flags, 32768)::binary, enc_f(:True, x.bot_nochats, x.flags, 65536)::binary, enc_f(:True, x.verified, x.flags, 131072)::binary, enc_f(:True, x.restricted, x.flags, 262144)::binary, enc_f(:True, x.min, x.flags, 1048576)::binary, enc_f(:True, x.bot_inline_geo, x.flags, 2097152)::binary, encode(:Int, x.id)::binary, enc_f(:Long, x.access_hash, x.flags, 1)::binary, enc_f(:String, x.first_name, x.flags, 2)::binary, enc_f(:String, x.last_name, x.flags, 4)::binary, enc_f(:String, x.username, x.flags, 8)::binary, enc_f(:String, x.phone, x.flags, 16)::binary, enc_f(x.photo, x.flags, 32)::binary, enc_f(x.status, x.flags, 64)::binary, enc_f(:Int, x.bot_info_version, x.flags, 16384)::binary, enc_f(:String, x.restriction_reason, x.flags, 262144)::binary, enc_f(:String, x.bot_inline_placeholder, x.flags, 524288)::binary>> | |
def encode(%UserProfilePhotoEmpty{}), do: <<225, 186, 17, 79>> | |
def encode(%UserProfilePhoto{} = x), do: <<200, 216, 89, 213, encode(:Long, x.photo_id)::binary, encode(x.photo_small)::binary, encode(x.photo_big)::binary>> | |
def encode(%UserStatusEmpty{}), do: <<73, 80, 208, 9>> | |
def encode(%UserStatusOnline{} = x), do: <<73, 57, 185, 237, encode(:Int, x.expires)::binary>> | |
def encode(%UserStatusOffline{} = x), do: <<63, 112, 140, 0, encode(:Int, x.was_online)::binary>> | |
def encode(%UserStatusRecently{}), do: <<241, 66, 111, 226>> | |
def encode(%UserStatusLastWeek{}), do: <<252, 9, 191, 7>> | |
def encode(%UserStatusLastMonth{}), do: <<66, 199, 235, 119>> | |
def encode(%ChatEmpty{} = x), do: <<0, 216, 162, 155, encode(:Int, x.id)::binary>> | |
def encode(%Chat{} = x), do: <<84, 221, 28, 217, encode(:Int, x.flags)::binary, enc_f(:True, x.creator, x.flags, 1)::binary, enc_f(:True, x.kicked, x.flags, 2)::binary, enc_f(:True, x.left, x.flags, 4)::binary, enc_f(:True, x.admins_enabled, x.flags, 8)::binary, enc_f(:True, x.admin, x.flags, 16)::binary, enc_f(:True, x.deactivated, x.flags, 32)::binary, encode(:Int, x.id)::binary, encode(:String, x.title)::binary, encode(x.photo)::binary, encode(:Int, x.participants_count)::binary, encode(:Int, x.date)::binary, encode(:Int, x.version)::binary, enc_f(x.migrated_to, x.flags, 64)::binary>> | |
def encode(%ChatForbidden{} = x), do: <<219, 139, 50, 7, encode(:Int, x.id)::binary, encode(:String, x.title)::binary>> | |
def encode(%Channel{} = x), do: <<82, 202, 77, 161, encode(:Int, x.flags)::binary, enc_f(:True, x.creator, x.flags, 1)::binary, enc_f(:True, x.kicked, x.flags, 2)::binary, enc_f(:True, x.left, x.flags, 4)::binary, enc_f(:True, x.editor, x.flags, 8)::binary, enc_f(:True, x.moderator, x.flags, 16)::binary, enc_f(:True, x.broadcast, x.flags, 32)::binary, enc_f(:True, x.verified, x.flags, 128)::binary, enc_f(:True, x.megagroup, x.flags, 256)::binary, enc_f(:True, x.restricted, x.flags, 512)::binary, enc_f(:True, x.democracy, x.flags, 1024)::binary, enc_f(:True, x.signatures, x.flags, 2048)::binary, enc_f(:True, x.min, x.flags, 4096)::binary, encode(:Int, x.id)::binary, enc_f(:Long, x.access_hash, x.flags, 8192)::binary, encode(:String, x.title)::binary, enc_f(:String, x.username, x.flags, 64)::binary, encode(x.photo)::binary, encode(:Int, x.date)::binary, encode(:Int, x.version)::binary, enc_f(:String, x.restriction_reason, x.flags, 512)::binary>> | |
def encode(%ChannelForbidden{} = x), do: <<79, 120, 55, 133, encode(:Int, x.flags)::binary, enc_f(:True, x.broadcast, x.flags, 32)::binary, enc_f(:True, x.megagroup, x.flags, 256)::binary, encode(:Int, x.id)::binary, encode(:Long, x.access_hash)::binary, encode(:String, x.title)::binary>> | |
def encode(%ChatFull{} = x), do: <<20, 166, 2, 46, encode(:Int, x.id)::binary, encode(x.participants)::binary, encode(x.chat_photo)::binary, encode(x.notify_settings)::binary, encode(x.exported_invite)::binary, enc_v(x.bot_info)::binary>> | |
def encode(%ChannelFull{} = x), do: <<47, 81, 213, 195, encode(:Int, x.flags)::binary, enc_f(:True, x.can_view_participants, x.flags, 8)::binary, enc_f(:True, x.can_set_username, x.flags, 64)::binary, encode(:Int, x.id)::binary, encode(:String, x.about)::binary, enc_f(:Int, x.participants_count, x.flags, 1)::binary, enc_f(:Int, x.admins_count, x.flags, 2)::binary, enc_f(:Int, x.kicked_count, x.flags, 4)::binary, encode(:Int, x.read_inbox_max_id)::binary, encode(:Int, x.read_outbox_max_id)::binary, encode(:Int, x.unread_count)::binary, encode(x.chat_photo)::binary, encode(x.notify_settings)::binary, encode(x.exported_invite)::binary, enc_v(x.bot_info)::binary, enc_f(:Int, x.migrated_from_chat_id, x.flags, 16)::binary, enc_f(:Int, x.migrated_from_max_id, x.flags, 16)::binary, enc_f(:Int, x.pinned_msg_id, x.flags, 32)::binary>> | |
def encode(%ChatParticipant{} = x), do: <<62, 73, 215, 200, encode(:Int, x.user_id)::binary, encode(:Int, x.inviter_id)::binary, encode(:Int, x.date)::binary>> | |
def encode(%ChatParticipantCreator{} = x), do: <<138, 83, 19, 218, encode(:Int, x.user_id)::binary>> | |
def encode(%ChatParticipantAdmin{} = x), do: <<54, 228, 214, 226, encode(:Int, x.user_id)::binary, encode(:Int, x.inviter_id)::binary, encode(:Int, x.date)::binary>> | |
def encode(%ChatParticipantsForbidden{} = x), do: <<43, 12, 144, 252, encode(:Int, x.flags)::binary, encode(:Int, x.chat_id)::binary, enc_f(x.self_participant, x.flags, 1)::binary>> | |
def encode(%ChatParticipants{} = x), do: <<237, 15, 70, 63, encode(:Int, x.chat_id)::binary, enc_v(x.participants)::binary, encode(:Int, x.version)::binary>> | |
def encode(%ChatPhotoEmpty{}), do: <<28, 1, 193, 55>> | |
def encode(%ChatPhoto{} = x), do: <<106, 39, 83, 97, encode(x.photo_small)::binary, encode(x.photo_big)::binary>> | |
def encode(%MessageEmpty{} = x), do: <<84, 222, 229, 131, encode(:Int, x.id)::binary>> | |
def encode(%Message{} = x), do: <<95, 228, 155, 192, encode(:Int, x.flags)::binary, enc_f(:True, x.out, x.flags, 2)::binary, enc_f(:True, x.mentioned, x.flags, 16)::binary, enc_f(:True, x.media_unread, x.flags, 32)::binary, enc_f(:True, x.silent, x.flags, 8192)::binary, enc_f(:True, x.post, x.flags, 16384)::binary, encode(:Int, x.id)::binary, enc_f(:Int, x.from_id, x.flags, 256)::binary, encode(x.to_id)::binary, enc_f(x.fwd_from, x.flags, 4)::binary, enc_f(:Int, x.via_bot_id, x.flags, 2048)::binary, enc_f(:Int, x.reply_to_msg_id, x.flags, 8)::binary, encode(:Int, x.date)::binary, encode(:String, x.message)::binary, enc_f(x.media, x.flags, 512)::binary, enc_f(x.reply_markup, x.flags, 64)::binary, enc_vf(x.entities, x.flags, 128)::binary, enc_f(:Int, x.views, x.flags, 1024)::binary, enc_f(:Int, x.edit_date, x.flags, 32768)::binary>> | |
def encode(%MessageService{} = x), do: <<246, 161, 25, 158, encode(:Int, x.flags)::binary, enc_f(:True, x.out, x.flags, 2)::binary, enc_f(:True, x.mentioned, x.flags, 16)::binary, enc_f(:True, x.media_unread, x.flags, 32)::binary, enc_f(:True, x.silent, x.flags, 8192)::binary, enc_f(:True, x.post, x.flags, 16384)::binary, encode(:Int, x.id)::binary, enc_f(:Int, x.from_id, x.flags, 256)::binary, encode(x.to_id)::binary, enc_f(:Int, x.reply_to_msg_id, x.flags, 8)::binary, encode(:Int, x.date)::binary, encode(x.action)::binary>> | |
def encode(%MessageMediaEmpty{}), do: <<32, 99, 237, 61>> | |
def encode(%MessageMediaPhoto{} = x), do: <<61, 229, 140, 61, encode(x.photo)::binary, encode(:String, x.caption)::binary>> | |
def encode(%MessageMediaGeo{} = x), do: <<116, 212, 224, 86, encode(x.geo)::binary>> | |
def encode(%MessageMediaContact{} = x), do: <<57, 47, 125, 94, encode(:String, x.phone_number)::binary, encode(:String, x.first_name)::binary, encode(:String, x.last_name)::binary, encode(:Int, x.user_id)::binary>> | |
def encode(%MessageMediaUnsupported{}), do: <<158, 244, 132, 159>> | |
def encode(%MessageMediaDocument{} = x), do: <<168, 46, 224, 243, encode(x.document)::binary, encode(:String, x.caption)::binary>> | |
def encode(%MessageMediaWebPage{} = x), do: <<0, 214, 45, 163, encode(x.webpage)::binary>> | |
def encode(%MessageMediaVenue{} = x), do: <<31, 183, 18, 121, encode(x.geo)::binary, encode(:String, x.title)::binary, encode(:String, x.address)::binary, encode(:String, x.provider)::binary, encode(:String, x.venue_id)::binary>> | |
def encode(%MessageMediaGame{} = x), do: <<8, 144, 177, 253, encode(x.game)::binary>> | |
def encode(%MessageActionEmpty{}), do: <<176, 247, 174, 182>> | |
def encode(%MessageActionChatCreate{} = x), do: <<154, 139, 99, 166, encode(:String, x.title)::binary, enc_v(:Int, x.users)::binary>> | |
def encode(%MessageActionChatEditTitle{} = x), do: <<90, 206, 161, 181, encode(:String, x.title)::binary>> | |
def encode(%MessageActionChatEditPhoto{} = x), do: <<168, 19, 203, 127, encode(x.photo)::binary>> | |
def encode(%MessageActionChatDeletePhoto{}), do: <<239, 251, 227, 149>> | |
def encode(%MessageActionChatAddUser{} = x), do: <<55, 115, 138, 72, enc_v(:Int, x.users)::binary>> | |
def encode(%MessageActionChatDeleteUser{} = x), do: <<12, 155, 174, 178, encode(:Int, x.user_id)::binary>> | |
def encode(%MessageActionChatJoinedByLink{} = x), do: <<232, 245, 156, 248, encode(:Int, x.inviter_id)::binary>> | |
def encode(%MessageActionChannelCreate{} = x), do: <<146, 172, 210, 149, encode(:String, x.title)::binary>> | |
def encode(%MessageActionChatMigrateTo{} = x), do: <<33, 176, 189, 81, encode(:Int, x.channel_id)::binary>> | |
def encode(%MessageActionChannelMigrateFrom{} = x), do: <<238, 234, 85, 176, encode(:String, x.title)::binary, encode(:Int, x.chat_id)::binary>> | |
def encode(%MessageActionPinMessage{}), do: <<237, 56, 189, 148>> | |
def encode(%MessageActionHistoryClear{}), do: <<4, 182, 186, 159>> | |
def encode(%MessageActionGameScore{} = x), do: <<118, 40, 167, 146, encode(:Long, x.game_id)::binary, encode(:Int, x.score)::binary>> | |
def encode(%MessageActionPhoneCall{} = x), do: <<127, 26, 225, 128, encode(:Int, x.flags)::binary, encode(:Long, x.call_id)::binary, enc_f(x.reason, x.flags, 1)::binary, enc_f(:Int, x.duration, x.flags, 2)::binary>> | |
def encode(%Dialog{} = x), do: <<20, 186, 255, 102, encode(:Int, x.flags)::binary, enc_f(:True, x.pinned, x.flags, 4)::binary, encode(x.peer)::binary, encode(:Int, x.top_message)::binary, encode(:Int, x.read_inbox_max_id)::binary, encode(:Int, x.read_outbox_max_id)::binary, encode(:Int, x.unread_count)::binary, encode(x.notify_settings)::binary, enc_f(:Int, x.pts, x.flags, 1)::binary, enc_f(x.draft, x.flags, 2)::binary>> | |
def encode(%PhotoEmpty{} = x), do: <<45, 178, 49, 35, encode(:Long, x.id)::binary>> | |
def encode(%Photo{} = x), do: <<41, 221, 136, 146, encode(:Int, x.flags)::binary, enc_f(:True, x.has_stickers, x.flags, 1)::binary, encode(:Long, x.id)::binary, encode(:Long, x.access_hash)::binary, encode(:Int, x.date)::binary, enc_v(x.sizes)::binary>> | |
def encode(%PhotoSizeEmpty{} = x), do: <<60, 226, 23, 14, encode(:String, x.type)::binary>> | |
def encode(%PhotoSize{} = x), do: <<27, 182, 191, 119, encode(:String, x.type)::binary, encode(x.location)::binary, encode(:Int, x.w)::binary, encode(:Int, x.h)::binary, encode(:Int, x.size)::binary>> | |
def encode(%PhotoCachedSize{} = x), do: <<250, 52, 167, 233, encode(:String, x.type)::binary, encode(x.location)::binary, encode(:Int, x.w)::binary, encode(:Int, x.h)::binary, encode(:Bytes, x.bytes)::binary>> | |
def encode(%GeoPointEmpty{}), do: <<95, 221, 23, 17>> | |
def encode(%GeoPoint{} = x), do: <<12, 215, 73, 32, encode(:Double, x.long)::binary, encode(:Double, x.lat)::binary>> | |
def encode(%Auth.CheckedPhone{} = x), do: <<142, 162, 30, 129, encode(x.phone_registered)::binary>> | |
def encode(%Auth.SentCode{} = x), do: <<2, 37, 0, 94, encode(:Int, x.flags)::binary, enc_f(:True, x.phone_registered, x.flags, 1)::binary, encode(x.type)::binary, encode(:String, x.phone_code_hash)::binary, enc_f(x.next_type, x.flags, 2)::binary, enc_f(:Int, x.timeout, x.flags, 4)::binary>> | |
def encode(%Auth.Authorization{} = x), do: <<22, 9, 5, 205, encode(:Int, x.flags)::binary, enc_f(:Int, x.tmp_sessions, x.flags, 1)::binary, encode(x.user)::binary>> | |
def encode(%Auth.ExportedAuthorization{} = x), do: <<45, 156, 150, 223, encode(:Int, x.id)::binary, encode(:Bytes, x.bytes)::binary>> | |
def encode(%InputNotifyPeer{} = x), do: <<12, 91, 188, 184, encode(x.peer)::binary>> | |
def encode(%InputNotifyUsers{}), do: <<23, 68, 59, 25>> | |
def encode(%InputNotifyChats{}), do: <<78, 232, 149, 74>> | |
def encode(%InputNotifyAll{}), do: <<134, 184, 41, 164>> | |
def encode(%InputPeerNotifyEventsEmpty{}), do: <<216, 100, 48, 240>> | |
def encode(%InputPeerNotifyEventsAll{}), do: <<116, 44, 106, 232>> | |
def encode(%InputPeerNotifySettings{} = x), do: <<178, 94, 147, 56, encode(:Int, x.flags)::binary, enc_f(:True, x.show_previews, x.flags, 1)::binary, enc_f(:True, x.silent, x.flags, 2)::binary, encode(:Int, x.mute_until)::binary, encode(:String, x.sound)::binary>> | |
def encode(%PeerNotifyEventsEmpty{}), do: <<179, 60, 213, 173>> | |
def encode(%PeerNotifyEventsAll{}), do: <<136, 237, 29, 109>> | |
def encode(%PeerNotifySettingsEmpty{}), do: <<18, 133, 166, 112>> | |
def encode(%PeerNotifySettings{} = x), do: <<192, 164, 205, 154, encode(:Int, x.flags)::binary, enc_f(:True, x.show_previews, x.flags, 1)::binary, enc_f(:True, x.silent, x.flags, 2)::binary, encode(:Int, x.mute_until)::binary, encode(:String, x.sound)::binary>> | |
def encode(%PeerSettings{} = x), do: <<205, 38, 132, 129, encode(:Int, x.flags)::binary, enc_f(:True, x.report_spam, x.flags, 1)::binary>> | |
def encode(%WallPaper{} = x), do: <<87, 54, 176, 204, encode(:Int, x.id)::binary, encode(:String, x.title)::binary, enc_v(x.sizes)::binary, encode(:Int, x.color)::binary>> | |
def encode(%WallPaperSolid{} = x), do: <<36, 127, 17, 99, encode(:Int, x.id)::binary, encode(:String, x.title)::binary, encode(:Int, x.bg_color)::binary, encode(:Int, x.color)::binary>> | |
def encode(%InputReportReasonSpam{}), do: <<184, 202, 219, 88>> | |
def encode(%InputReportReasonViolence{}), do: <<141, 199, 34, 30>> | |
def encode(%InputReportReasonPornography{}), do: <<34, 217, 89, 46>> | |
def encode(%InputReportReasonOther{} = x), do: <<10, 109, 116, 225, encode(:String, x.text)::binary>> | |
def encode(%UserFull{} = x), do: <<63, 15, 34, 15, encode(:Int, x.flags)::binary, enc_f(:True, x.blocked, x.flags, 1)::binary, enc_f(:True, x.phone_calls_available, x.flags, 16)::binary, encode(x.user)::binary, enc_f(:String, x.about, x.flags, 2)::binary, encode(x.link)::binary, enc_f(x.profile_photo, x.flags, 4)::binary, encode(x.notify_settings)::binary, enc_f(x.bot_info, x.flags, 8)::binary, encode(:Int, x.common_chats_count)::binary>> | |
def encode(%Contact{} = x), do: <<148, 201, 17, 249, encode(:Int, x.user_id)::binary, encode(x.mutual)::binary>> | |
def encode(%ImportedContact{} = x), do: <<56, 132, 2, 208, encode(:Int, x.user_id)::binary, encode(:Long, x.client_id)::binary>> | |
def encode(%ContactBlocked{} = x), do: <<121, 200, 27, 86, encode(:Int, x.user_id)::binary, encode(:Int, x.date)::binary>> | |
def encode(%ContactStatus{} = x), do: <<97, 12, 104, 211, encode(:Int, x.user_id)::binary, encode(x.status)::binary>> | |
def encode(%Contacts.Link{} = x), do: <<76, 72, 206, 58, encode(x.my_link)::binary, encode(x.foreign_link)::binary, encode(x.user)::binary>> | |
def encode(%Contacts.ContactsNotModified{}), do: <<210, 169, 75, 183>> | |
def encode(%Contacts.Contacts{} = x), do: <<178, 140, 139, 111, enc_v(x.contacts)::binary, enc_v(x.users)::binary>> | |
def encode(%Contacts.ImportedContacts{} = x), do: <<21, 67, 82, 173, enc_v(x.imported)::binary, enc_v(:Long, x.retry_contacts)::binary, enc_v(x.users)::binary>> | |
def encode(%Contacts.Blocked{} = x), do: <<21, 141, 19, 28, enc_v(x.blocked)::binary, enc_v(x.users)::binary>> | |
def encode(%Contacts.BlockedSlice{} = x), do: <<161, 2, 8, 144, encode(:Int, x.count)::binary, enc_v(x.blocked)::binary, enc_v(x.users)::binary>> | |
def encode(%Messages.Dialogs{} = x), do: <<64, 108, 186, 21, enc_v(x.dialogs)::binary, enc_v(x.messages)::binary, enc_v(x.chats)::binary, enc_v(x.users)::binary>> | |
def encode(%Messages.DialogsSlice{} = x), do: <<243, 148, 224, 113, encode(:Int, x.count)::binary, enc_v(x.dialogs)::binary, enc_v(x.messages)::binary, enc_v(x.chats)::binary, enc_v(x.users)::binary>> | |
def encode(%Messages.Messages{} = x), do: <<135, 142, 113, 140, enc_v(x.messages)::binary, enc_v(x.chats)::binary, enc_v(x.users)::binary>> | |
def encode(%Messages.MessagesSlice{} = x), do: <<227, 106, 68, 11, encode(:Int, x.count)::binary, enc_v(x.messages)::binary, enc_v(x.chats)::binary, enc_v(x.users)::binary>> | |
def encode(%Messages.ChannelMessages{} = x), do: <<55, 46, 38, 153, encode(:Int, x.flags)::binary, encode(:Int, x.pts)::binary, encode(:Int, x.count)::binary, enc_v(x.messages)::binary, enc_v(x.chats)::binary, enc_v(x.users)::binary>> | |
def encode(%Messages.Chats{} = x), do: <<213, 159, 255, 100, enc_v(x.chats)::binary>> | |
def encode(%Messages.ChatsSlice{} = x), do: <<68, 17, 216, 156, encode(:Int, x.count)::binary, enc_v(x.chats)::binary>> | |
def encode(%Messages.ChatFull{} = x), do: <<156, 209, 215, 229, encode(x.full_chat)::binary, enc_v(x.chats)::binary, enc_v(x.users)::binary>> | |
def encode(%Messages.AffectedHistory{} = x), do: <<209, 105, 92, 180, encode(:Int, x.pts)::binary, encode(:Int, x.pts_count)::binary, encode(:Int, x.offset)::binary>> | |
def encode(%InputMessagesFilterEmpty{}), do: <<108, 246, 226, 87>> | |
def encode(%InputMessagesFilterPhotos{}), do: <<28, 165, 9, 150>> | |
def encode(%InputMessagesFilterVideo{}), do: <<101, 14, 192, 159>> | |
def encode(%InputMessagesFilterPhotoVideo{}), do: <<228, 240, 233, 86>> | |
def encode(%InputMessagesFilterPhotoVideoDocuments{}), do: <<187, 115, 94, 217>> | |
def encode(%InputMessagesFilterDocument{}), do: <<136, 241, 221, 158>> | |
def encode(%InputMessagesFilterUrl{}), do: <<135, 221, 240, 126>> | |
def encode(%InputMessagesFilterGif{}), do: <<135, 101, 200, 255>> | |
def encode(%InputMessagesFilterVoice{}), do: <<146, 195, 245, 80>> | |
def encode(%InputMessagesFilterMusic{}), do: <<158, 180, 81, 55>> | |
def encode(%InputMessagesFilterChatPhotos{}), do: <<184, 236, 32, 58>> | |
def encode(%InputMessagesFilterPhoneCalls{} = x), do: <<104, 151, 201, 128, encode(:Int, x.flags)::binary, enc_f(:True, x.missed, x.flags, 1)::binary>> | |
def encode(%UpdateNewMessage{} = x), do: <<253, 10, 43, 31, encode(x.message)::binary, encode(:Int, x.pts)::binary, encode(:Int, x.pts_count)::binary>> | |
def encode(%UpdateMessageID{} = x), do: <<214, 191, 144, 78, encode(:Int, x.id)::binary, encode(:Long, x.random_id)::binary>> | |
def encode(%UpdateDeleteMessages{} = x), do: <<229, 176, 13, 162, enc_v(:Int, x.messages)::binary, encode(:Int, x.pts)::binary, encode(:Int, x.pts_count)::binary>> | |
def encode(%UpdateUserTyping{} = x), do: <<39, 105, 72, 92, encode(:Int, x.user_id)::binary, encode(x.action)::binary>> | |
def encode(%UpdateChatUserTyping{} = x), do: <<31, 234, 101, 154, encode(:Int, x.chat_id)::binary, encode(:Int, x.user_id)::binary, encode(x.action)::binary>> | |
def encode(%UpdateChatParticipants{} = x), do: <<152, 17, 118, 7, encode(x.participants)::binary>> | |
def encode(%UpdateUserStatus{} = x), do: <<35, 216, 251, 27, encode(:Int, x.user_id)::binary, encode(x.status)::binary>> | |
def encode(%UpdateUserName{} = x), do: <<115, 43, 51, 167, encode(:Int, x.user_id)::binary, encode(:String, x.first_name)::binary, encode(:String, x.last_name)::binary, encode(:String, x.username)::binary>> | |
def encode(%UpdateUserPhoto{} = x), do: <<12, 59, 49, 149, encode(:Int, x.user_id)::binary, encode(:Int, x.date)::binary, encode(x.photo)::binary, encode(x.previous)::binary>> | |
def encode(%UpdateContactRegistered{} = x), do: <<185, 187, 117, 37, encode(:Int, x.user_id)::binary, encode(:Int, x.date)::binary>> | |
def encode(%UpdateContactLink{} = x), do: <<197, 103, 46, 157, encode(:Int, x.user_id)::binary, encode(x.my_link)::binary, encode(x.foreign_link)::binary>> | |
def encode(%UpdateNewEncryptedMessage{} = x), do: <<154, 189, 188, 18, encode(x.message)::binary, encode(:Int, x.qts)::binary>> | |
def encode(%UpdateEncryptedChatTyping{} = x), do: <<86, 241, 16, 23, encode(:Int, x.chat_id)::binary>> | |
def encode(%UpdateEncryption{} = x), do: <<141, 232, 162, 180, encode(x.chat)::binary, encode(:Int, x.date)::binary>> | |
def encode(%UpdateEncryptedMessagesRead{} = x), do: <<183, 37, 254, 56, encode(:Int, x.chat_id)::binary, encode(:Int, x.max_date)::binary, encode(:Int, x.date)::binary>> | |
def encode(%UpdateChatParticipantAdd{} = x), do: <<92, 14, 75, 234, encode(:Int, x.chat_id)::binary, encode(:Int, x.user_id)::binary, encode(:Int, x.inviter_id)::binary, encode(:Int, x.date)::binary, encode(:Int, x.version)::binary>> | |
def encode(%UpdateChatParticipantDelete{} = x), do: <<34, 140, 95, 110, encode(:Int, x.chat_id)::binary, encode(:Int, x.user_id)::binary, encode(:Int, x.version)::binary>> | |
def encode(%UpdateDcOptions{} = x), do: <<115, 152, 94, 142, enc_v(x.dc_options)::binary>> | |
def encode(%UpdateUserBlocked{} = x), do: <<26, 232, 236, 128, encode(:Int, x.user_id)::binary, encode(x.blocked)::binary>> | |
def encode(%UpdateNotifySettings{} = x), do: <<239, 104, 194, 190, encode(x.peer)::binary, encode(x.notify_settings)::binary>> | |
def encode(%UpdateServiceNotification{} = x), do: <<25, 104, 228, 235, encode(:Int, x.flags)::binary, enc_f(:True, x.popup, x.flags, 1)::binary, enc_f(:Int, x.inbox_date, x.flags, 2)::binary, encode(:String, x.type)::binary, encode(:String, x.message)::binary, encode(x.media)::binary, enc_v(x.entities)::binary>> | |
def encode(%UpdatePrivacy{} = x), do: <<42, 39, 59, 238, encode(x.key)::binary, enc_v(x.rules)::binary>> | |
def encode(%UpdateUserPhone{} = x), do: <<123, 65, 185, 18, encode(:Int, x.user_id)::binary, encode(:String, x.phone)::binary>> | |
def encode(%UpdateReadHistoryInbox{} = x), do: <<92, 253, 97, 153, encode(x.peer)::binary, encode(:Int, x.max_id)::binary, encode(:Int, x.pts)::binary, encode(:Int, x.pts_count)::binary>> | |
def encode(%UpdateReadHistoryOutbox{} = x), do: <<191, 33, 47, 47, encode(x.peer)::binary, encode(:Int, x.max_id)::binary, encode(:Int, x.pts)::binary, encode(:Int, x.pts_count)::binary>> | |
def encode(%UpdateWebPage{} = x), do: <<19, 18, 137, 127, encode(x.webpage)::binary, encode(:Int, x.pts)::binary, encode(:Int, x.pts_count)::binary>> | |
def encode(%UpdateReadMessagesContents{} = x), do: <<51, 57, 193, 104, enc_v(:Int, x.messages)::binary, encode(:Int, x.pts)::binary, encode(:Int, x.pts_count)::binary>> | |
def encode(%UpdateChannelTooLong{} = x), do: <<251, 103, 4, 235, encode(:Int, x.flags)::binary, encode(:Int, x.channel_id)::binary, enc_f(:Int, x.pts, x.flags, 1)::binary>> | |
def encode(%UpdateChannel{} = x), do: <<86, 86, 212, 182, encode(:Int, x.channel_id)::binary>> | |
def encode(%UpdateNewChannelMessage{} = x), do: <<217, 4, 186, 98, encode(x.message)::binary, encode(:Int, x.pts)::binary, encode(:Int, x.pts_count)::binary>> | |
def encode(%UpdateReadChannelInbox{} = x), do: <<127, 243, 20, 66, encode(:Int, x.channel_id)::binary, encode(:Int, x.max_id)::binary>> | |
def encode(%UpdateDeleteChannelMessages{} = x), do: <<201, 33, 117, 195, encode(:Int, x.channel_id)::binary, enc_v(:Int, x.messages)::binary, encode(:Int, x.pts)::binary, encode(:Int, x.pts_count)::binary>> | |
def encode(%UpdateChannelMessageViews{} = x), do: <<75, 43, 161, 152, encode(:Int, x.channel_id)::binary, encode(:Int, x.id)::binary, encode(:Int, x.views)::binary>> | |
def encode(%UpdateChatAdmins{} = x), do: <<65, 121, 148, 110, encode(:Int, x.chat_id)::binary, encode(x.enabled)::binary, encode(:Int, x.version)::binary>> | |
def encode(%UpdateChatParticipantAdmin{} = x), do: <<89, 25, 144, 182, encode(:Int, x.chat_id)::binary, encode(:Int, x.user_id)::binary, encode(x.is_admin)::binary, encode(:Int, x.version)::binary>> | |
def encode(%UpdateNewStickerSet{} = x), do: <<170, 48, 138, 104, encode(x.stickerset)::binary>> | |
def encode(%UpdateStickerSetsOrder{} = x), do: <<1, 210, 178, 11, encode(:Int, x.flags)::binary, enc_f(:True, x.masks, x.flags, 1)::binary, enc_v(:Long, x.order)::binary>> | |
def encode(%UpdateStickerSets{}), do: <<236, 61, 174, 67>> | |
def encode(%UpdateSavedGifs{}), do: <<30, 52, 117, 147>> | |
def encode(%UpdateBotInlineQuery{} = x), do: <<144, 102, 130, 84, encode(:Int, x.flags)::binary, encode(:Long, x.query_id)::binary, encode(:Int, x.user_id)::binary, encode(:String, x.query)::binary, enc_f(x.geo, x.flags, 1)::binary, encode(:String, x.offset)::binary>> | |
def encode(%UpdateBotInlineSend{} = x), do: <<100, 249, 72, 14, encode(:Int, x.flags)::binary, encode(:Int, x.user_id)::binary, encode(:String, x.query)::binary, enc_f(x.geo, x.flags, 1)::binary, encode(:String, x.id)::binary, enc_f(x.msg_id, x.flags, 2)::binary>> | |
def encode(%UpdateEditChannelMessage{} = x), do: <<247, 77, 63, 27, encode(x.message)::binary, encode(:Int, x.pts)::binary, encode(:Int, x.pts_count)::binary>> | |
def encode(%UpdateChannelPinnedMessage{} = x), do: <<117, 36, 89, 152, encode(:Int, x.channel_id)::binary, encode(:Int, x.id)::binary>> | |
def encode(%UpdateBotCallbackQuery{} = x), do: <<225, 71, 53, 231, encode(:Int, x.flags)::binary, encode(:Long, x.query_id)::binary, encode(:Int, x.user_id)::binary, encode(x.peer)::binary, encode(:Int, x.msg_id)::binary, encode(:Long, x.chat_instance)::binary, enc_f(:Bytes, x.data, x.flags, 1)::binary, enc_f(:String, x.game_short_name, x.flags, 2)::binary>> | |
def encode(%UpdateEditMessage{} = x), do: <<163, 112, 3, 228, encode(x.message)::binary, encode(:Int, x.pts)::binary, encode(:Int, x.pts_count)::binary>> | |
def encode(%UpdateInlineBotCallbackQuery{} = x), do: <<90, 122, 210, 249, encode(:Int, x.flags)::binary, encode(:Long, x.query_id)::binary, encode(:Int, x.user_id)::binary, encode(x.msg_id)::binary, encode(:Long, x.chat_instance)::binary, enc_f(:Bytes, x.data, x.flags, 1)::binary, enc_f(:String, x.game_short_name, x.flags, 2)::binary>> | |
def encode(%UpdateReadChannelOutbox{} = x), do: <<199, 201, 214, 37, encode(:Int, x.channel_id)::binary, encode(:Int, x.max_id)::binary>> | |
def encode(%UpdateDraftMessage{} = x), do: <<105, 185, 43, 238, encode(x.peer)::binary, encode(x.draft)::binary>> | |
def encode(%UpdateReadFeaturedStickers{}), do: <<66, 39, 29, 87>> | |
def encode(%UpdateRecentStickers{}), do: <<32, 44, 66, 154>> | |
def encode(%UpdateConfig{}), do: <<6, 221, 41, 162>> | |
def encode(%UpdatePtsChanged{}), do: <<143, 103, 84, 51>> | |
def encode(%UpdateChannelWebPage{} = x), do: <<0, 25, 119, 64, encode(:Int, x.channel_id)::binary, encode(x.webpage)::binary, encode(:Int, x.pts)::binary, encode(:Int, x.pts_count)::binary>> | |
def encode(%UpdatePhoneCall{} = x), do: <<30, 107, 15, 171, encode(x.phone_call)::binary>> | |
def encode(%UpdateDialogPinned{} = x), do: <<204, 162, 17, 215, encode(:Int, x.flags)::binary, enc_f(:True, x.pinned, x.flags, 1)::binary, encode(x.peer)::binary>> | |
def encode(%UpdatePinnedDialogs{} = x), do: <<141, 246, 202, 216, encode(:Int, x.flags)::binary, enc_vf(x.order, x.flags, 1)::binary>> | |
def encode(%Updates.State{} = x), do: <<62, 42, 108, 165, encode(:Int, x.pts)::binary, encode(:Int, x.qts)::binary, encode(:Int, x.date)::binary, encode(:Int, x.seq)::binary, encode(:Int, x.unread_count)::binary>> | |
def encode(%Updates.DifferenceEmpty{} = x), do: <<56, 161, 117, 93, encode(:Int, x.date)::binary, encode(:Int, x.seq)::binary>> | |
def encode(%Updates.Difference{} = x), do: <<160, 156, 244, 0, enc_v(x.new_messages)::binary, enc_v(x.new_encrypted_messages)::binary, enc_v(x.other_updates)::binary, enc_v(x.chats)::binary, enc_v(x.users)::binary, encode(x.state)::binary>> | |
def encode(%Updates.DifferenceSlice{} = x), do: <<129, 25, 251, 168, enc_v(x.new_messages)::binary, enc_v(x.new_encrypted_messages)::binary, enc_v(x.other_updates)::binary, enc_v(x.chats)::binary, enc_v(x.users)::binary, encode(x.intermediate_state)::binary>> | |
def encode(%Updates.DifferenceTooLong{} = x), do: <<109, 143, 254, 74, encode(:Int, x.pts)::binary>> | |
def encode(%UpdatesTooLong{}), do: <<126, 175, 23, 227>> | |
def encode(%UpdateShortMessage{} = x), do: <<17, 191, 79, 145, encode(:Int, x.flags)::binary, enc_f(:True, x.out, x.flags, 2)::binary, enc_f(:True, x.mentioned, x.flags, 16)::binary, enc_f(:True, x.media_unread, x.flags, 32)::binary, enc_f(:True, x.silent, x.flags, 8192)::binary, encode(:Int, x.id)::binary, encode(:Int, x.user_id)::binary, encode(:String, x.message)::binary, encode(:Int, x.pts)::binary, encode(:Int, x.pts_count)::binary, encode(:Int, x.date)::binary, enc_f(x.fwd_from, x.flags, 4)::binary, enc_f(:Int, x.via_bot_id, x.flags, 2048)::binary, enc_f(:Int, x.reply_to_msg_id, x.flags, 8)::binary, enc_vf(x.entities, x.flags, 128)::binary>> | |
def encode(%UpdateShortChatMessage{} = x), do: <<136, 38, 129, 22, encode(:Int, x.flags)::binary, enc_f(:True, x.out, x.flags, 2)::binary, enc_f(:True, x.mentioned, x.flags, 16)::binary, enc_f(:True, x.media_unread, x.flags, 32)::binary, enc_f(:True, x.silent, x.flags, 8192)::binary, encode(:Int, x.id)::binary, encode(:Int, x.from_id)::binary, encode(:Int, x.chat_id)::binary, encode(:String, x.message)::binary, encode(:Int, x.pts)::binary, encode(:Int, x.pts_count)::binary, encode(:Int, x.date)::binary, enc_f(x.fwd_from, x.flags, 4)::binary, enc_f(:Int, x.via_bot_id, x.flags, 2048)::binary, enc_f(:Int, x.reply_to_msg_id, x.flags, 8)::binary, enc_vf(x.entities, x.flags, 128)::binary>> | |
def encode(%UpdateShort{} = x), do: <<193, 222, 212, 120, encode(x.update)::binary, encode(:Int, x.date)::binary>> | |
def encode(%UpdatesCombined{} = x), do: <<195, 4, 91, 114, enc_v(x.updates)::binary, enc_v(x.users)::binary, enc_v(x.chats)::binary, encode(:Int, x.date)::binary, encode(:Int, x.seq_start)::binary, encode(:Int, x.seq)::binary>> | |
def encode(%Updates{} = x), do: <<64, 66, 174, 116, enc_v(x.updates)::binary, enc_v(x.users)::binary, enc_v(x.chats)::binary, encode(:Int, x.date)::binary, encode(:Int, x.seq)::binary>> | |
def encode(%UpdateShortSentMessage{} = x), do: <<28, 51, 241, 17, encode(:Int, x.flags)::binary, enc_f(:True, x.out, x.flags, 2)::binary, encode(:Int, x.id)::binary, encode(:Int, x.pts)::binary, encode(:Int, x.pts_count)::binary, encode(:Int, x.date)::binary, enc_f(x.media, x.flags, 512)::binary, enc_vf(x.entities, x.flags, 128)::binary>> | |
def encode(%Photos.Photos{} = x), do: <<165, 106, 202, 141, enc_v(x.photos)::binary, enc_v(x.users)::binary>> | |
def encode(%Photos.PhotosSlice{} = x), do: <<84, 31, 5, 21, encode(:Int, x.count)::binary, enc_v(x.photos)::binary, enc_v(x.users)::binary>> | |
def encode(%Photos.Photo{} = x), do: <<168, 44, 33, 32, encode(x.photo)::binary, enc_v(x.users)::binary>> | |
def encode(%Upload.File{} = x), do: <<213, 24, 106, 9, encode(x.type)::binary, encode(:Int, x.mtime)::binary, encode(:Bytes, x.bytes)::binary>> | |
def encode(%DcOption{} = x), do: <<204, 198, 216, 5, encode(:Int, x.flags)::binary, enc_f(:True, x.ipv6, x.flags, 1)::binary, enc_f(:True, x.media_only, x.flags, 2)::binary, enc_f(:True, x.tcpo_only, x.flags, 4)::binary, encode(:Int, x.id)::binary, encode(:String, x.ip_address)::binary, encode(:Int, x.port)::binary>> | |
def encode(%Config{} = x), do: <<95, 251, 246, 58, encode(:Int, x.flags)::binary, enc_f(:True, x.phonecalls_enabled, x.flags, 2)::binary, encode(:Int, x.date)::binary, encode(:Int, x.expires)::binary, encode(x.test_mode)::binary, encode(:Int, x.this_dc)::binary, enc_v(x.dc_options)::binary, encode(:Int, x.chat_size_max)::binary, encode(:Int, x.megagroup_size_max)::binary, encode(:Int, x.forwarded_count_max)::binary, encode(:Int, x.online_update_period_ms)::binary, encode(:Int, x.offline_blur_timeout_ms)::binary, encode(:Int, x.offline_idle_timeout_ms)::binary, encode(:Int, x.online_cloud_timeout_ms)::binary, encode(:Int, x.notify_cloud_delay_ms)::binary, encode(:Int, x.notify_default_delay_ms)::binary, encode(:Int, x.chat_big_size)::binary, encode(:Int, x.push_chat_period_ms)::binary, encode(:Int, x.push_chat_limit)::binary, encode(:Int, x.saved_gifs_limit)::binary, encode(:Int, x.edit_time_limit)::binary, encode(:Int, x.rating_e_decay)::binary, encode(:Int, x.stickers_recent_limit)::binary, enc_f(:Int, x.tmp_sessions, x.flags, 1)::binary, encode(:Int, x.pinned_dialogs_count_max)::binary, encode(:Int, x.call_receive_timeout_ms)::binary, encode(:Int, x.call_ring_timeout_ms)::binary, encode(:Int, x.call_connect_timeout_ms)::binary, encode(:Int, x.call_packet_timeout_ms)::binary, enc_v(x.disabled_features)::binary>> | |
def encode(%NearestDc{} = x), do: <<117, 23, 26, 142, encode(:String, x.country)::binary, encode(:Int, x.this_dc)::binary, encode(:Int, x.nearest_dc)::binary>> | |
def encode(%Help.AppUpdate{} = x), do: <<17, 243, 135, 137, encode(:Int, x.id)::binary, encode(x.critical)::binary, encode(:String, x.url)::binary, encode(:String, x.text)::binary>> | |
def encode(%Help.NoAppUpdate{}), do: <<54, 101, 90, 196>> | |
def encode(%Help.InviteText{} = x), do: <<120, 159, 203, 24, encode(:String, x.message)::binary>> | |
def encode(%EncryptedChatEmpty{} = x), do: <<160, 192, 126, 171, encode(:Int, x.id)::binary>> | |
def encode(%EncryptedChatWaiting{} = x), do: <<220, 3, 247, 59, encode(:Int, x.id)::binary, encode(:Long, x.access_hash)::binary, encode(:Int, x.date)::binary, encode(:Int, x.admin_id)::binary, encode(:Int, x.participant_id)::binary>> | |
def encode(%EncryptedChatRequested{} = x), do: <<126, 82, 120, 200, encode(:Int, x.id)::binary, encode(:Long, x.access_hash)::binary, encode(:Int, x.date)::binary, encode(:Int, x.admin_id)::binary, encode(:Int, x.participant_id)::binary, encode(:Bytes, x.g_a)::binary>> | |
def encode(%EncryptedChat{} = x), do: <<54, 206, 86, 250, encode(:Int, x.id)::binary, encode(:Long, x.access_hash)::binary, encode(:Int, x.date)::binary, encode(:Int, x.admin_id)::binary, encode(:Int, x.participant_id)::binary, encode(:Bytes, x.g_a_or_b)::binary, encode(:Long, x.key_fingerprint)::binary>> | |
def encode(%EncryptedChatDiscarded{} = x), do: <<39, 221, 214, 19, encode(:Int, x.id)::binary>> | |
def encode(%InputEncryptedChat{} = x), do: <<225, 181, 65, 241, encode(:Int, x.chat_id)::binary, encode(:Long, x.access_hash)::binary>> | |
def encode(%EncryptedFileEmpty{}), do: <<126, 73, 31, 194>> | |
def encode(%EncryptedFile{} = x), do: <<76, 153, 112, 74, encode(:Long, x.id)::binary, encode(:Long, x.access_hash)::binary, encode(:Int, x.size)::binary, encode(:Int, x.dc_id)::binary, encode(:Int, x.key_fingerprint)::binary>> | |
def encode(%InputEncryptedFileEmpty{}), do: <<100, 195, 55, 24>> | |
def encode(%InputEncryptedFileUploaded{} = x), do: <<6, 3, 189, 100, encode(:Long, x.id)::binary, encode(:Int, x.parts)::binary, encode(:String, x.md5_checksum)::binary, encode(:Int, x.key_fingerprint)::binary>> | |
def encode(%InputEncryptedFile{} = x), do: <<229, 181, 23, 90, encode(:Long, x.id)::binary, encode(:Long, x.access_hash)::binary>> | |
def encode(%InputEncryptedFileBigUploaded{} = x), do: <<200, 115, 193, 45, encode(:Long, x.id)::binary, encode(:Int, x.parts)::binary, encode(:Int, x.key_fingerprint)::binary>> | |
def encode(%EncryptedMessage{} = x), do: <<24, 193, 24, 237, encode(:Long, x.random_id)::binary, encode(:Int, x.chat_id)::binary, encode(:Int, x.date)::binary, encode(:Bytes, x.bytes)::binary, encode(x.file)::binary>> | |
def encode(%EncryptedMessageService{} = x), do: <<6, 75, 115, 35, encode(:Long, x.random_id)::binary, encode(:Int, x.chat_id)::binary, encode(:Int, x.date)::binary, encode(:Bytes, x.bytes)::binary>> | |
def encode(%Messages.DhConfigNotModified{} = x), do: <<53, 70, 226, 192, encode(:Bytes, x.random)::binary>> | |
def encode(%Messages.DhConfig{} = x), do: <<221, 30, 34, 44, encode(:Int, x.g)::binary, encode(:Bytes, x.p)::binary, encode(:Int, x.version)::binary, encode(:Bytes, x.random)::binary>> | |
def encode(%Messages.SentEncryptedMessage{} = x), do: <<53, 137, 15, 86, encode(:Int, x.date)::binary>> | |
def encode(%Messages.SentEncryptedFile{} = x), do: <<50, 255, 147, 148, encode(:Int, x.date)::binary, encode(x.file)::binary>> | |
def encode(%InputDocumentEmpty{}), do: <<174, 234, 240, 114>> | |
def encode(%InputDocument{} = x), do: <<82, 137, 121, 24, encode(:Long, x.id)::binary, encode(:Long, x.access_hash)::binary>> | |
def encode(%DocumentEmpty{} = x), do: <<113, 200, 248, 54, encode(:Long, x.id)::binary>> | |
def encode(%Document{} = x), do: <<199, 43, 35, 135, encode(:Long, x.id)::binary, encode(:Long, x.access_hash)::binary, encode(:Int, x.date)::binary, encode(:String, x.mime_type)::binary, encode(:Int, x.size)::binary, encode(x.thumb)::binary, encode(:Int, x.dc_id)::binary, encode(:Int, x.version)::binary, enc_v(x.attributes)::binary>> | |
def encode(%Help.Support{} = x), do: <<246, 181, 198, 23, encode(:String, x.phone_number)::binary, encode(x.user)::binary>> | |
def encode(%NotifyPeer{} = x), do: <<216, 11, 212, 159, encode(x.peer)::binary>> | |
def encode(%NotifyUsers{}), do: <<76, 59, 200, 180>> | |
def encode(%NotifyChats{}), do: <<195, 206, 7, 192>> | |
def encode(%NotifyAll{}), do: <<96, 124, 208, 116>> | |
def encode(%SendMessageTypingAction{}), do: <<78, 116, 191, 22>> | |
def encode(%SendMessageCancelAction{}), do: <<245, 200, 94, 253>> | |
def encode(%SendMessageRecordVideoAction{}), do: <<111, 214, 135, 161>> | |
def encode(%SendMessageUploadVideoAction{} = x), do: <<236, 58, 118, 233, encode(:Int, x.progress)::binary>> | |
def encode(%SendMessageRecordAudioAction{}), do: <<247, 115, 47, 213>> | |
def encode(%SendMessageUploadAudioAction{} = x), do: <<171, 215, 81, 243, encode(:Int, x.progress)::binary>> | |
def encode(%SendMessageUploadPhotoAction{} = x), do: <<38, 74, 211, 209, encode(:Int, x.progress)::binary>> | |
def encode(%SendMessageUploadDocumentAction{} = x), do: <<228, 217, 12, 170, encode(:Int, x.progress)::binary>> | |
def encode(%SendMessageGeoLocationAction{}), do: <<161, 139, 111, 23>> | |
def encode(%SendMessageChooseContactAction{}), do: <<111, 188, 140, 98>> | |
def encode(%SendMessageGamePlayAction{}), do: <<72, 143, 106, 221>> | |
def encode(%Contacts.Found{} = x), do: <<132, 247, 161, 26, enc_v(x.results)::binary, enc_v(x.chats)::binary, enc_v(x.users)::binary>> | |
def encode(%InputPrivacyKeyStatusTimestamp{}), do: <<24, 203, 150, 79>> | |
def encode(%InputPrivacyKeyChatInvite{}), do: <<38, 4, 251, 189>> | |
def encode(%InputPrivacyKeyPhoneCall{}), do: <<95, 220, 186, 250>> | |
def encode(%PrivacyKeyStatusTimestamp{}), do: <<48, 171, 46, 188>> | |
def encode(%PrivacyKeyChatInvite{}), do: <<250, 109, 14, 80>> | |
def encode(%PrivacyKeyPhoneCall{}), do: <<123, 43, 102, 61>> | |
def encode(%InputPrivacyValueAllowContacts{}), do: <<123, 224, 9, 13>> | |
def encode(%InputPrivacyValueAllowAll{}), do: <<206, 53, 75, 24>> | |
def encode(%InputPrivacyValueAllowUsers{} = x), do: <<127, 198, 28, 19, enc_v(x.users)::binary>> | |
def encode(%InputPrivacyValueDisallowContacts{}), do: <<7, 32, 165, 11>> | |
def encode(%InputPrivacyValueDisallowAll{}), do: <<201, 102, 107, 214>> | |
def encode(%InputPrivacyValueDisallowUsers{} = x), do: <<103, 4, 17, 144, enc_v(x.users)::binary>> | |
def encode(%PrivacyValueAllowContacts{}), do: <<172, 27, 254, 255>> | |
def encode(%PrivacyValueAllowAll{}), do: <<130, 123, 66, 101>> | |
def encode(%PrivacyValueAllowUsers{} = x), do: <<12, 190, 91, 77, enc_v(:Int, x.users)::binary>> | |
def encode(%PrivacyValueDisallowContacts{}), do: <<26, 250, 136, 248>> | |
def encode(%PrivacyValueDisallowAll{}), do: <<99, 231, 115, 139>> | |
def encode(%PrivacyValueDisallowUsers{} = x), do: <<183, 73, 127, 12, enc_v(:Int, x.users)::binary>> | |
def encode(%Account.PrivacyRules{} = x), do: <<111, 187, 74, 85, enc_v(x.rules)::binary, enc_v(x.users)::binary>> | |
def encode(%AccountDaysTTL{} = x), do: <<223, 175, 208, 184, encode(:Int, x.days)::binary>> | |
def encode(%DocumentAttributeImageSize{} = x), do: <<92, 193, 55, 108, encode(:Int, x.w)::binary, encode(:Int, x.h)::binary>> | |
def encode(%DocumentAttributeAnimated{}), do: <<57, 137, 181, 17>> | |
def encode(%DocumentAttributeSticker{} = x), do: <<18, 214, 25, 99, encode(:Int, x.flags)::binary, enc_f(:True, x.mask, x.flags, 2)::binary, encode(:String, x.alt)::binary, encode(x.stickerset)::binary, enc_f(x.mask_coords, x.flags, 1)::binary>> | |
def encode(%DocumentAttributeVideo{} = x), do: <<203, 204, 16, 89, encode(:Int, x.duration)::binary, encode(:Int, x.w)::binary, encode(:Int, x.h)::binary>> | |
def encode(%DocumentAttributeAudio{} = x), do: <<198, 249, 82, 152, encode(:Int, x.flags)::binary, enc_f(:True, x.voice, x.flags, 1024)::binary, encode(:Int, x.duration)::binary, enc_f(:String, x.title, x.flags, 1)::binary, enc_f(:String, x.performer, x.flags, 2)::binary, enc_f(:Bytes, x.waveform, x.flags, 4)::binary>> | |
def encode(%DocumentAttributeFilename{} = x), do: <<104, 0, 89, 21, encode(:String, x.file_name)::binary>> | |
def encode(%DocumentAttributeHasStickers{}), do: <<247, 210, 1, 152>> | |
def encode(%Messages.StickersNotModified{}), do: <<34, 154, 116, 241>> | |
def encode(%Messages.Stickers{} = x), do: <<50, 205, 142, 138, encode(:String, x.hash)::binary, enc_v(x.stickers)::binary>> | |
def encode(%StickerPack{} = x), do: <<212, 153, 178, 18, encode(:String, x.emoticon)::binary, enc_v(:Long, x.documents)::binary>> | |
def encode(%Messages.AllStickersNotModified{}), do: <<195, 2, 102, 232>> | |
def encode(%Messages.AllStickers{} = x), do: <<95, 64, 253, 237, encode(:Int, x.hash)::binary, enc_v(x.sets)::binary>> | |
def encode(%DisabledFeature{} = x), do: <<36, 111, 99, 174, encode(:String, x.feature)::binary, encode(:String, x.description)::binary>> | |
def encode(%Messages.AffectedMessages{} = x), do: <<133, 145, 209, 132, encode(:Int, x.pts)::binary, encode(:Int, x.pts_count)::binary>> | |
def encode(%ContactLinkUnknown{}), do: <<71, 146, 79, 95>> | |
def encode(%ContactLinkNone{}), do: <<173, 211, 237, 254>> | |
def encode(%ContactLinkHasPhone{}), do: <<89, 63, 143, 38>> | |
def encode(%ContactLinkContact{}), do: <<208, 194, 2, 213>> | |
def encode(%WebPageEmpty{} = x), do: <<232, 119, 20, 235, encode(:Long, x.id)::binary>> | |
def encode(%WebPagePending{} = x), do: <<28, 218, 134, 197, encode(:Long, x.id)::binary, encode(:Int, x.date)::binary>> | |
def encode(%WebPage{} = x), do: <<188, 180, 7, 95, encode(:Int, x.flags)::binary, encode(:Long, x.id)::binary, encode(:String, x.url)::binary, encode(:String, x.display_url)::binary, encode(:Int, x.hash)::binary, enc_f(:String, x.type, x.flags, 1)::binary, enc_f(:String, x.site_name, x.flags, 2)::binary, enc_f(:String, x.title, x.flags, 4)::binary, enc_f(:String, x.description, x.flags, 8)::binary, enc_f(x.photo, x.flags, 16)::binary, enc_f(:String, x.embed_url, x.flags, 32)::binary, enc_f(:String, x.embed_type, x.flags, 32)::binary, enc_f(:Int, x.embed_width, x.flags, 64)::binary, enc_f(:Int, x.embed_height, x.flags, 64)::binary, enc_f(:Int, x.duration, x.flags, 128)::binary, enc_f(:String, x.author, x.flags, 256)::binary, enc_f(x.document, x.flags, 512)::binary, enc_f(x.cached_page, x.flags, 1024)::binary>> | |
def encode(%WebPageNotModified{}), do: <<115, 148, 132, 133>> | |
def encode(%Authorization{} = x), do: <<246, 230, 242, 123, encode(:Long, x.hash)::binary, encode(:Int, x.flags)::binary, encode(:String, x.device_model)::binary, encode(:String, x.platform)::binary, encode(:String, x.system_version)::binary, encode(:Int, x.api_id)::binary, encode(:String, x.app_name)::binary, encode(:String, x.app_version)::binary, encode(:Int, x.date_created)::binary, encode(:Int, x.date_active)::binary, encode(:String, x.ip)::binary, encode(:String, x.country)::binary, encode(:String, x.region)::binary>> | |
def encode(%Account.Authorizations{} = x), do: <<222, 171, 80, 18, enc_v(x.authorizations)::binary>> | |
def encode(%Account.NoPassword{} = x), do: <<24, 188, 218, 150, encode(:Bytes, x.new_salt)::binary, encode(:String, x.email_unconfirmed_pattern)::binary>> | |
def encode(%Account.Password{} = x), do: <<28, 20, 24, 124, encode(:Bytes, x.current_salt)::binary, encode(:Bytes, x.new_salt)::binary, encode(:String, x.hint)::binary, encode(x.has_recovery)::binary, encode(:String, x.email_unconfirmed_pattern)::binary>> | |
def encode(%Account.PasswordSettings{} = x), do: <<179, 42, 183, 183, encode(:String, x.email)::binary>> | |
def encode(%Account.PasswordInputSettings{} = x), do: <<235, 109, 145, 134, encode(:Int, x.flags)::binary, enc_f(:Bytes, x.new_salt, x.flags, 1)::binary, enc_f(:Bytes, x.new_password_hash, x.flags, 1)::binary, enc_f(:String, x.hint, x.flags, 1)::binary, enc_f(:String, x.email, x.flags, 2)::binary>> | |
def encode(%Auth.PasswordRecovery{} = x), do: <<165, 72, 121, 19, encode(:String, x.email_pattern)::binary>> | |
def encode(%ReceivedNotifyMessage{} = x), do: <<121, 183, 132, 163, encode(:Int, x.id)::binary, encode(:Int, x.flags)::binary>> | |
def encode(%ChatInviteEmpty{}), do: <<105, 55, 223, 105>> | |
def encode(%ChatInviteExported{} = x), do: <<188, 5, 46, 252, encode(:String, x.link)::binary>> | |
def encode(%ChatInviteAlready{} = x), do: <<124, 109, 104, 90, encode(x.chat)::binary>> | |
def encode(%ChatInvite{} = x), do: <<88, 245, 116, 219, encode(:Int, x.flags)::binary, enc_f(:True, x.channel, x.flags, 1)::binary, enc_f(:True, x.broadcast, x.flags, 2)::binary, enc_f(:True, x.public, x.flags, 4)::binary, enc_f(:True, x.megagroup, x.flags, 8)::binary, encode(:String, x.title)::binary, encode(x.photo)::binary, encode(:Int, x.participants_count)::binary, enc_vf(x.participants, x.flags, 16)::binary>> | |
def encode(%InputStickerSetEmpty{}), do: <<149, 43, 182, 255>> | |
def encode(%InputStickerSetID{} = x), do: <<105, 162, 231, 157, encode(:Long, x.id)::binary, encode(:Long, x.access_hash)::binary>> | |
def encode(%InputStickerSetShortName{} = x), do: <<160, 200, 28, 134, encode(:String, x.short_name)::binary>> | |
def encode(%StickerSet{} = x), do: <<65, 59, 48, 205, encode(:Int, x.flags)::binary, enc_f(:True, x.installed, x.flags, 1)::binary, enc_f(:True, x.archived, x.flags, 2)::binary, enc_f(:True, x.official, x.flags, 4)::binary, enc_f(:True, x.masks, x.flags, 8)::binary, encode(:Long, x.id)::binary, encode(:Long, x.access_hash)::binary, encode(:String, x.title)::binary, encode(:String, x.short_name)::binary, encode(:Int, x.count)::binary, encode(:Int, x.hash)::binary>> | |
def encode(%Messages.StickerSet{} = x), do: <<166, 36, 10, 182, encode(x.set)::binary, enc_v(x.packs)::binary, enc_v(x.documents)::binary>> | |
def encode(%BotCommand{} = x), do: <<199, 200, 122, 194, encode(:String, x.command)::binary, encode(:String, x.description)::binary>> | |
def encode(%BotInfo{} = x), do: <<58, 29, 232, 152, encode(:Int, x.user_id)::binary, encode(:String, x.description)::binary, enc_v(x.commands)::binary>> | |
def encode(%KeyboardButton{} = x), do: <<128, 72, 250, 162, encode(:String, x.text)::binary>> | |
def encode(%KeyboardButtonUrl{} = x), do: <<5, 255, 138, 37, encode(:String, x.text)::binary, encode(:String, x.url)::binary>> | |
def encode(%KeyboardButtonCallback{} = x), do: <<70, 94, 58, 104, encode(:String, x.text)::binary, encode(:Bytes, x.data)::binary>> | |
def encode(%KeyboardButtonRequestPhone{} = x), do: <<41, 108, 106, 177, encode(:String, x.text)::binary>> | |
def encode(%KeyboardButtonRequestGeoLocation{} = x), do: <<63, 107, 121, 252, encode(:String, x.text)::binary>> | |
def encode(%KeyboardButtonSwitchInline{} = x), do: <<72, 167, 104, 5, encode(:Int, x.flags)::binary, enc_f(:True, x.same_peer, x.flags, 1)::binary, encode(:String, x.text)::binary, encode(:String, x.query)::binary>> | |
def encode(%KeyboardButtonGame{} = x), do: <<207, 28, 244, 80, encode(:String, x.text)::binary>> | |
def encode(%KeyboardButtonRow{} = x), do: <<131, 139, 96, 119, enc_v(x.buttons)::binary>> | |
def encode(%ReplyKeyboardHide{} = x), do: <<133, 91, 62, 160, encode(:Int, x.flags)::binary, enc_f(:True, x.selective, x.flags, 4)::binary>> | |
def encode(%ReplyKeyboardForceReply{} = x), do: <<160, 138, 16, 244, encode(:Int, x.flags)::binary, enc_f(:True, x.single_use, x.flags, 2)::binary, enc_f(:True, x.selective, x.flags, 4)::binary>> | |
def encode(%ReplyKeyboardMarkup{} = x), do: <<140, 117, 2, 53, encode(:Int, x.flags)::binary, enc_f(:True, x.resize, x.flags, 1)::binary, enc_f(:True, x.single_use, x.flags, 2)::binary, enc_f(:True, x.selective, x.flags, 4)::binary, enc_v(x.rows)::binary>> | |
def encode(%ReplyInlineMarkup{} = x), do: <<84, 2, 163, 72, enc_v(x.rows)::binary>> | |
def encode(%Help.AppChangelogEmpty{}), do: <<148, 3, 126, 175>> | |
def encode(%Help.AppChangelog{} = x), do: <<124, 126, 19, 42, encode(:String, x.message)::binary, encode(x.media)::binary, enc_v(x.entities)::binary>> | |
def encode(%MessageEntityUnknown{} = x), do: <<149, 186, 146, 187, encode(:Int, x.offset)::binary, encode(:Int, x.length)::binary>> | |
def encode(%MessageEntityMention{} = x), do: <<157, 87, 4, 250, encode(:Int, x.offset)::binary, encode(:Int, x.length)::binary>> | |
def encode(%MessageEntityHashtag{} = x), do: <<13, 91, 99, 111, encode(:Int, x.offset)::binary, encode(:Int, x.length)::binary>> | |
def encode(%MessageEntityBotCommand{} = x), do: <<199, 138, 239, 108, encode(:Int, x.offset)::binary, encode(:Int, x.length)::binary>> | |
def encode(%MessageEntityUrl{} = x), do: <<56, 37, 208, 110, encode(:Int, x.offset)::binary, encode(:Int, x.length)::binary>> | |
def encode(%MessageEntityEmail{} = x), do: <<194, 117, 228, 100, encode(:Int, x.offset)::binary, encode(:Int, x.length)::binary>> | |
def encode(%MessageEntityBold{} = x), do: <<201, 11, 97, 189, encode(:Int, x.offset)::binary, encode(:Int, x.length)::binary>> | |
def encode(%MessageEntityItalic{} = x), do: <<96, 139, 111, 130, encode(:Int, x.offset)::binary, encode(:Int, x.length)::binary>> | |
def encode(%MessageEntityCode{} = x), do: <<113, 5, 162, 40, encode(:Int, x.offset)::binary, encode(:Int, x.length)::binary>> | |
def encode(%MessageEntityPre{} = x), do: <<224, 75, 146, 115, encode(:Int, x.offset)::binary, encode(:Int, x.length)::binary, encode(:String, x.language)::binary>> | |
def encode(%MessageEntityTextUrl{} = x), do: <<39, 211, 166, 118, encode(:Int, x.offset)::binary, encode(:Int, x.length)::binary, encode(:String, x.url)::binary>> | |
def encode(%MessageEntityMentionName{} = x), do: <<88, 202, 45, 53, encode(:Int, x.offset)::binary, encode(:Int, x.length)::binary, encode(:Int, x.user_id)::binary>> | |
def encode(%InputMessageEntityMentionName{} = x), do: <<201, 104, 142, 32, encode(:Int, x.offset)::binary, encode(:Int, x.length)::binary, encode(x.user_id)::binary>> | |
def encode(%InputChannelEmpty{}), do: <<134, 30, 140, 238>> | |
def encode(%InputChannel{} = x), do: <<46, 113, 235, 175, encode(:Int, x.channel_id)::binary, encode(:Long, x.access_hash)::binary>> | |
def encode(%Contacts.ResolvedPeer{} = x), do: <<217, 122, 7, 127, encode(x.peer)::binary, enc_v(x.chats)::binary, enc_v(x.users)::binary>> | |
def encode(%MessageRange{} = x), do: <<83, 2, 227, 10, encode(:Int, x.min_id)::binary, encode(:Int, x.max_id)::binary>> | |
def encode(%Updates.ChannelDifferenceEmpty{} = x), do: <<251, 175, 17, 62, encode(:Int, x.flags)::binary, enc_f(:True, x.final, x.flags, 1)::binary, encode(:Int, x.pts)::binary, enc_f(:Int, x.timeout, x.flags, 2)::binary>> | |
def encode(%Updates.ChannelDifferenceTooLong{} = x), do: <<7, 238, 13, 65, encode(:Int, x.flags)::binary, enc_f(:True, x.final, x.flags, 1)::binary, encode(:Int, x.pts)::binary, enc_f(:Int, x.timeout, x.flags, 2)::binary, encode(:Int, x.top_message)::binary, encode(:Int, x.read_inbox_max_id)::binary, encode(:Int, x.read_outbox_max_id)::binary, encode(:Int, x.unread_count)::binary, enc_v(x.messages)::binary, enc_v(x.chats)::binary, enc_v(x.users)::binary>> | |
def encode(%Updates.ChannelDifference{} = x), do: <<78, 103, 100, 32, encode(:Int, x.flags)::binary, enc_f(:True, x.final, x.flags, 1)::binary, encode(:Int, x.pts)::binary, enc_f(:Int, x.timeout, x.flags, 2)::binary, enc_v(x.new_messages)::binary, enc_v(x.other_updates)::binary, enc_v(x.chats)::binary, enc_v(x.users)::binary>> | |
def encode(%ChannelMessagesFilterEmpty{}), do: <<231, 46, 212, 148>> | |
def encode(%ChannelMessagesFilter{} = x), do: <<87, 217, 119, 205, encode(:Int, x.flags)::binary, enc_f(:True, x.exclude_new_messages, x.flags, 2)::binary, enc_v(x.ranges)::binary>> | |
def encode(%ChannelParticipant{} = x), do: <<29, 172, 235, 21, encode(:Int, x.user_id)::binary, encode(:Int, x.date)::binary>> | |
def encode(%ChannelParticipantSelf{} = x), do: <<109, 154, 40, 163, encode(:Int, x.user_id)::binary, encode(:Int, x.inviter_id)::binary, encode(:Int, x.date)::binary>> | |
def encode(%ChannelParticipantModerator{} = x), do: <<239, 127, 5, 145, encode(:Int, x.user_id)::binary, encode(:Int, x.inviter_id)::binary, encode(:Int, x.date)::binary>> | |
def encode(%ChannelParticipantEditor{} = x), do: <<97, 45, 25, 152, encode(:Int, x.user_id)::binary, encode(:Int, x.inviter_id)::binary, encode(:Int, x.date)::binary>> | |
def encode(%ChannelParticipantKicked{} = x), do: <<154, 230, 197, 140, encode(:Int, x.user_id)::binary, encode(:Int, x.kicked_by)::binary, encode(:Int, x.date)::binary>> | |
def encode(%ChannelParticipantCreator{} = x), do: <<249, 225, 226, 227, encode(:Int, x.user_id)::binary>> | |
def encode(%ChannelParticipantsRecent{}), do: <<121, 60, 63, 222>> | |
def encode(%ChannelParticipantsAdmins{}), do: <<105, 137, 96, 180>> | |
def encode(%ChannelParticipantsKicked{}), do: <<122, 187, 55, 60>> | |
def encode(%ChannelParticipantsBots{}), do: <<91, 134, 209, 176>> | |
def encode(%ChannelRoleEmpty{}), do: <<198, 160, 133, 178>> | |
def encode(%ChannelRoleModerator{}), do: <<117, 217, 24, 150>> | |
def encode(%ChannelRoleEditor{}), do: <<140, 254, 11, 130>> | |
def encode(%Channels.ChannelParticipants{} = x), do: <<168, 226, 110, 245, encode(:Int, x.count)::binary, enc_v(x.participants)::binary, enc_v(x.users)::binary>> | |
def encode(%Channels.ChannelParticipant{} = x), do: <<99, 177, 217, 208, encode(x.participant)::binary, enc_v(x.users)::binary>> | |
def encode(%Help.TermsOfService{} = x), do: <<144, 62, 238, 241, encode(:String, x.text)::binary>> | |
def encode(%FoundGif{} = x), do: <<31, 204, 46, 22, encode(:String, x.url)::binary, encode(:String, x.thumb_url)::binary, encode(:String, x.content_url)::binary, encode(:String, x.content_type)::binary, encode(:Int, x.w)::binary, encode(:Int, x.h)::binary>> | |
def encode(%FoundGifCached{} = x), do: <<9, 4, 117, 156, encode(:String, x.url)::binary, encode(x.photo)::binary, encode(x.document)::binary>> | |
def encode(%Messages.FoundGifs{} = x), do: <<10, 28, 10, 69, encode(:Int, x.next_offset)::binary, enc_v(x.results)::binary>> | |
def encode(%Messages.SavedGifsNotModified{}), do: <<162, 92, 2, 232>> | |
def encode(%Messages.SavedGifs{} = x), do: <<165, 9, 7, 46, encode(:Int, x.hash)::binary, enc_v(x.gifs)::binary>> | |
def encode(%InputBotInlineMessageMediaAuto{} = x), do: <<19, 237, 47, 41, encode(:Int, x.flags)::binary, encode(:String, x.caption)::binary, enc_f(x.reply_markup, x.flags, 4)::binary>> | |
def encode(%InputBotInlineMessageText{} = x), do: <<135, 122, 205, 61, encode(:Int, x.flags)::binary, enc_f(:True, x.no_webpage, x.flags, 1)::binary, encode(:String, x.message)::binary, enc_vf(x.entities, x.flags, 2)::binary, enc_f(x.reply_markup, x.flags, 4)::binary>> | |
def encode(%InputBotInlineMessageMediaGeo{} = x), do: <<225, 157, 165, 244, encode(:Int, x.flags)::binary, encode(x.geo_point)::binary, enc_f(x.reply_markup, x.flags, 4)::binary>> | |
def encode(%InputBotInlineMessageMediaVenue{} = x), do: <<200, 173, 175, 170, encode(:Int, x.flags)::binary, encode(x.geo_point)::binary, encode(:String, x.title)::binary, encode(:String, x.address)::binary, encode(:String, x.provider)::binary, encode(:String, x.venue_id)::binary, enc_f(x.reply_markup, x.flags, 4)::binary>> | |
def encode(%InputBotInlineMessageMediaContact{} = x), do: <<167, 1, 175, 45, encode(:Int, x.flags)::binary, encode(:String, x.phone_number)::binary, encode(:String, x.first_name)::binary, encode(:String, x.last_name)::binary, enc_f(x.reply_markup, x.flags, 4)::binary>> | |
def encode(%InputBotInlineMessageGame{} = x), do: <<100, 88, 66, 75, encode(:Int, x.flags)::binary, enc_f(x.reply_markup, x.flags, 4)::binary>> | |
def encode(%InputBotInlineResult{} = x), do: <<90, 225, 187, 44, encode(:Int, x.flags)::binary, encode(:String, x.id)::binary, encode(:String, x.type)::binary, enc_f(:String, x.title, x.flags, 2)::binary, enc_f(:String, x.description, x.flags, 4)::binary, enc_f(:String, x.url, x.flags, 8)::binary, enc_f(:String, x.thumb_url, x.flags, 16)::binary, enc_f(:String, x.content_url, x.flags, 32)::binary, enc_f(:String, x.content_type, x.flags, 32)::binary, enc_f(:Int, x.w, x.flags, 64)::binary, enc_f(:Int, x.h, x.flags, 64)::binary, enc_f(:Int, x.duration, x.flags, 128)::binary, encode(x.send_message)::binary>> | |
def encode(%InputBotInlineResultPhoto{} = x), do: <<167, 100, 216, 168, encode(:String, x.id)::binary, encode(:String, x.type)::binary, encode(x.photo)::binary, encode(x.send_message)::binary>> | |
def encode(%InputBotInlineResultDocument{} = x), do: <<196, 253, 248, 255, encode(:Int, x.flags)::binary, encode(:String, x.id)::binary, encode(:String, x.type)::binary, enc_f(:String, x.title, x.flags, 2)::binary, enc_f(:String, x.description, x.flags, 4)::binary, encode(x.document)::binary, encode(x.send_message)::binary>> | |
def encode(%InputBotInlineResultGame{} = x), do: <<242, 23, 164, 79, encode(:String, x.id)::binary, encode(:String, x.short_name)::binary, encode(x.send_message)::binary>> | |
def encode(%BotInlineMessageMediaAuto{} = x), do: <<91, 177, 116, 10, encode(:Int, x.flags)::binary, encode(:String, x.caption)::binary, enc_f(x.reply_markup, x.flags, 4)::binary>> | |
def encode(%BotInlineMessageText{} = x), do: <<226, 101, 127, 140, encode(:Int, x.flags)::binary, enc_f(:True, x.no_webpage, x.flags, 1)::binary, encode(:String, x.message)::binary, enc_vf(x.entities, x.flags, 2)::binary, enc_f(x.reply_markup, x.flags, 4)::binary>> | |
def encode(%BotInlineMessageMediaGeo{} = x), do: <<184, 216, 143, 58, encode(:Int, x.flags)::binary, encode(x.geo)::binary, enc_f(x.reply_markup, x.flags, 4)::binary>> | |
def encode(%BotInlineMessageMediaVenue{} = x), do: <<46, 35, 102, 67, encode(:Int, x.flags)::binary, encode(x.geo)::binary, encode(:String, x.title)::binary, encode(:String, x.address)::binary, encode(:String, x.provider)::binary, encode(:String, x.venue_id)::binary, enc_f(x.reply_markup, x.flags, 4)::binary>> | |
def encode(%BotInlineMessageMediaContact{} = x), do: <<212, 180, 237, 53, encode(:Int, x.flags)::binary, encode(:String, x.phone_number)::binary, encode(:String, x.first_name)::binary, encode(:String, x.last_name)::binary, enc_f(x.reply_markup, x.flags, 4)::binary>> | |
def encode(%BotInlineResult{} = x), do: <<185, 174, 235, 155, encode(:Int, x.flags)::binary, encode(:String, x.id)::binary, encode(:String, x.type)::binary, enc_f(:String, x.title, x.flags, 2)::binary, enc_f(:String, x.description, x.flags, 4)::binary, enc_f(:String, x.url, x.flags, 8)::binary, enc_f(:String, x.thumb_url, x.flags, 16)::binary, enc_f(:String, x.content_url, x.flags, 32)::binary, enc_f(:String, x.content_type, x.flags, 32)::binary, enc_f(:Int, x.w, x.flags, 64)::binary, enc_f(:Int, x.h, x.flags, 64)::binary, enc_f(:Int, x.duration, x.flags, 128)::binary, encode(x.send_message)::binary>> | |
def encode(%BotInlineMediaResult{} = x), do: <<11, 148, 219, 23, encode(:Int, x.flags)::binary, encode(:String, x.id)::binary, encode(:String, x.type)::binary, enc_f(x.photo, x.flags, 1)::binary, enc_f(x.document, x.flags, 2)::binary, enc_f(:String, x.title, x.flags, 4)::binary, enc_f(:String, x.description, x.flags, 8)::binary, encode(x.send_message)::binary>> | |
def encode(%Messages.BotResults{} = x), do: <<61, 86, 211, 204, encode(:Int, x.flags)::binary, enc_f(:True, x.gallery, x.flags, 1)::binary, encode(:Long, x.query_id)::binary, enc_f(:String, x.next_offset, x.flags, 2)::binary, enc_f(x.switch_pm, x.flags, 4)::binary, enc_v(x.results)::binary, encode(:Int, x.cache_time)::binary>> | |
def encode(%ExportedMessageLink{} = x), do: <<3, 104, 72, 31, encode(:String, x.link)::binary>> | |
def encode(%MessageFwdHeader{} = x), do: <<203, 221, 134, 199, encode(:Int, x.flags)::binary, enc_f(:Int, x.from_id, x.flags, 1)::binary, encode(:Int, x.date)::binary, enc_f(:Int, x.channel_id, x.flags, 2)::binary, enc_f(:Int, x.channel_post, x.flags, 4)::binary>> | |
def encode(%Auth.CodeTypeSms{}), do: <<140, 21, 163, 114>> | |
def encode(%Auth.CodeTypeCall{}), do: <<227, 211, 28, 116>> | |
def encode(%Auth.CodeTypeFlashCall{}), do: <<251, 206, 108, 34>> | |
def encode(%Auth.SentCodeTypeApp{} = x), do: <<134, 89, 187, 61, encode(:Int, x.length)::binary>> | |
def encode(%Auth.SentCodeTypeSms{} = x), do: <<162, 187, 0, 192, encode(:Int, x.length)::binary>> | |
def encode(%Auth.SentCodeTypeCall{} = x), do: <<167, 229, 83, 83, encode(:Int, x.length)::binary>> | |
def encode(%Auth.SentCodeTypeFlashCall{} = x), do: <<217, 198, 3, 171, encode(:String, x.pattern)::binary>> | |
def encode(%Messages.BotCallbackAnswer{} = x), do: <<164, 94, 88, 54, encode(:Int, x.flags)::binary, enc_f(:True, x.alert, x.flags, 2)::binary, enc_f(:True, x.has_url, x.flags, 8)::binary, enc_f(:String, x.message, x.flags, 1)::binary, enc_f(:String, x.url, x.flags, 4)::binary, encode(:Int, x.cache_time)::binary>> | |
def encode(%Messages.MessageEditData{} = x), do: <<230, 221, 181, 38, encode(:Int, x.flags)::binary, enc_f(:True, x.caption, x.flags, 1)::binary>> | |
def encode(%InputBotInlineMessageID{} = x), do: <<137, 61, 12, 137, encode(:Int, x.dc_id)::binary, encode(:Long, x.id)::binary, encode(:Long, x.access_hash)::binary>> | |
def encode(%InlineBotSwitchPM{} = x), do: <<159, 98, 32, 60, encode(:String, x.text)::binary, encode(:String, x.start_param)::binary>> | |
def encode(%Messages.PeerDialogs{} = x), do: <<84, 195, 113, 51, enc_v(x.dialogs)::binary, enc_v(x.messages)::binary, enc_v(x.chats)::binary, enc_v(x.users)::binary, encode(x.state)::binary>> | |
def encode(%TopPeer{} = x), do: <<91, 192, 205, 237, encode(x.peer)::binary, encode(:Double, x.rating)::binary>> | |
def encode(%TopPeerCategoryBotsPM{}), do: <<91, 27, 102, 171>> | |
def encode(%TopPeerCategoryBotsInline{}), do: <<226, 119, 134, 20>> | |
def encode(%TopPeerCategoryCorrespondents{}), do: <<237, 183, 55, 6>> | |
def encode(%TopPeerCategoryGroups{}), do: <<74, 161, 23, 189>> | |
def encode(%TopPeerCategoryChannels{}), do: <<40, 150, 29, 22>> | |
def encode(%TopPeerCategoryPeers{} = x), do: <<145, 66, 131, 251, encode(x.category)::binary, encode(:Int, x.count)::binary, enc_v(x.peers)::binary>> | |
def encode(%Contacts.TopPeersNotModified{}), do: <<245, 110, 38, 222>> | |
def encode(%Contacts.TopPeers{} = x), do: <<168, 114, 183, 112, enc_v(x.categories)::binary, enc_v(x.chats)::binary, enc_v(x.users)::binary>> | |
def encode(%DraftMessageEmpty{}), do: <<197, 174, 75, 186>> | |
def encode(%DraftMessage{} = x), do: <<31, 113, 142, 253, encode(:Int, x.flags)::binary, enc_f(:True, x.no_webpage, x.flags, 2)::binary, enc_f(:Int, x.reply_to_msg_id, x.flags, 1)::binary, encode(:String, x.message)::binary, enc_vf(x.entities, x.flags, 8)::binary, encode(:Int, x.date)::binary>> | |
def encode(%Messages.FeaturedStickersNotModified{}), do: <<207, 227, 237, 4>> | |
def encode(%Messages.FeaturedStickers{} = x), do: <<229, 136, 157, 248, encode(:Int, x.hash)::binary, enc_v(x.sets)::binary, enc_v(:Long, x.unread)::binary>> | |
def encode(%Messages.RecentStickersNotModified{}), do: <<144, 248, 23, 11>> | |
def encode(%Messages.RecentStickers{} = x), do: <<112, 9, 226, 92, encode(:Int, x.hash)::binary, enc_v(x.stickers)::binary>> | |
def encode(%Messages.ArchivedStickers{} = x), do: <<200, 169, 203, 79, encode(:Int, x.count)::binary, enc_v(x.sets)::binary>> | |
def encode(%Messages.StickerSetInstallResultSuccess{}), do: <<40, 22, 100, 56>> | |
def encode(%Messages.StickerSetInstallResultArchive{} = x), do: <<168, 16, 228, 53, enc_v(x.sets)::binary>> | |
def encode(%StickerSetCovered{} = x), do: <<210, 165, 16, 100, encode(x.set)::binary, encode(x.cover)::binary>> | |
def encode(%StickerSetMultiCovered{} = x), do: <<27, 229, 7, 52, encode(x.set)::binary, enc_v(x.covers)::binary>> | |
def encode(%MaskCoords{} = x), do: <<178, 219, 214, 174, encode(:Int, x.n)::binary, encode(:Double, x.x)::binary, encode(:Double, x.y)::binary, encode(:Double, x.zoom)::binary>> | |
def encode(%InputStickeredMediaPhoto{} = x), do: <<87, 33, 153, 74, encode(x.id)::binary>> | |
def encode(%InputStickeredMediaDocument{} = x), do: <<91, 134, 56, 4, encode(x.id)::binary>> | |
def encode(%Game{} = x), do: <<59, 101, 249, 189, encode(:Int, x.flags)::binary, encode(:Long, x.id)::binary, encode(:Long, x.access_hash)::binary, encode(:String, x.short_name)::binary, encode(:String, x.title)::binary, encode(:String, x.description)::binary, encode(x.photo)::binary, enc_f(x.document, x.flags, 1)::binary>> | |
def encode(%InputGameID{} = x), do: <<119, 62, 44, 3, encode(:Long, x.id)::binary, encode(:Long, x.access_hash)::binary>> | |
def encode(%InputGameShortName{} = x), do: <<10, 232, 49, 195, encode(x.bot_id)::binary, encode(:String, x.short_name)::binary>> | |
def encode(%HighScore{} = x), do: <<208, 252, 255, 88, encode(:Int, x.pos)::binary, encode(:Int, x.user_id)::binary, encode(:Int, x.score)::binary>> | |
def encode(%Messages.HighScores{} = x), do: <<153, 253, 59, 154, enc_v(x.scores)::binary, enc_v(x.users)::binary>> | |
def encode(%TextEmpty{}), do: <<79, 130, 61, 220>> | |
def encode(%TextPlain{} = x), do: <<224, 148, 70, 116, encode(:String, x.text)::binary>> | |
def encode(%TextBold{} = x), do: <<196, 171, 36, 103, encode(x.text)::binary>> | |
def encode(%TextItalic{} = x), do: <<156, 165, 18, 217, encode(x.text)::binary>> | |
def encode(%TextUnderline{} = x), do: <<196, 34, 38, 193, encode(x.text)::binary>> | |
def encode(%TextStrike{} = x), do: <<149, 187, 248, 155, encode(x.text)::binary>> | |
def encode(%TextFixed{} = x), do: <<185, 25, 63, 108, encode(x.text)::binary>> | |
def encode(%TextUrl{} = x), do: <<193, 132, 40, 60, encode(x.text)::binary, encode(:String, x.url)::binary, encode(:Long, x.webpage_id)::binary>> | |
def encode(%TextEmail{} = x), do: <<214, 13, 90, 222, encode(x.text)::binary, encode(:String, x.email)::binary>> | |
def encode(%TextConcat{} = x), do: <<215, 96, 98, 126, enc_v(x.texts)::binary>> | |
def encode(%PageBlockUnsupported{}), do: <<138, 126, 86, 19>> | |
def encode(%PageBlockTitle{} = x), do: <<253, 195, 171, 112, encode(x.text)::binary>> | |
def encode(%PageBlockSubtitle{} = x), do: <<31, 154, 250, 143, encode(x.text)::binary>> | |
def encode(%PageBlockAuthorDate{} = x), do: <<224, 229, 175, 186, encode(x.author)::binary, encode(:Int, x.published_date)::binary>> | |
def encode(%PageBlockHeader{} = x), do: <<236, 100, 208, 191, encode(x.text)::binary>> | |
def encode(%PageBlockSubheader{} = x), do: <<225, 182, 43, 241, encode(x.text)::binary>> | |
def encode(%PageBlockParagraph{} = x), do: <<102, 7, 122, 70, encode(x.text)::binary>> | |
def encode(%PageBlockPreformatted{} = x), do: <<62, 217, 112, 192, encode(x.text)::binary, encode(:String, x.language)::binary>> | |
def encode(%PageBlockFooter{} = x), do: <<153, 9, 135, 72, encode(x.text)::binary>> | |
def encode(%PageBlockDivider{}), do: <<136, 177, 32, 219>> | |
def encode(%PageBlockAnchor{} = x), do: <<176, 55, 13, 206, encode(:String, x.name)::binary>> | |
def encode(%PageBlockList{} = x), do: <<244, 199, 88, 58, encode(x.ordered)::binary, enc_v(x.items)::binary>> | |
def encode(%PageBlockBlockquote{} = x), do: <<38, 124, 61, 38, encode(x.text)::binary, encode(x.caption)::binary>> | |
def encode(%PageBlockPullquote{} = x), do: <<211, 86, 68, 79, encode(x.text)::binary, encode(x.caption)::binary>> | |
def encode(%PageBlockPhoto{} = x), do: <<130, 153, 198, 233, encode(:Long, x.photo_id)::binary, encode(x.caption)::binary>> | |
def encode(%PageBlockVideo{} = x), do: <<102, 24, 215, 217, encode(:Int, x.flags)::binary, enc_f(:True, x.autoplay, x.flags, 1)::binary, enc_f(:True, x.loop, x.flags, 2)::binary, encode(:Long, x.video_id)::binary, encode(x.caption)::binary>> | |
def encode(%PageBlockCover{} = x), do: <<0, 51, 242, 57, encode(x.cover)::binary>> | |
def encode(%PageBlockEmbed{} = x), do: <<209, 0, 226, 205, encode(:Int, x.flags)::binary, enc_f(:True, x.full_width, x.flags, 1)::binary, enc_f(:True, x.allow_scrolling, x.flags, 8)::binary, enc_f(:String, x.url, x.flags, 2)::binary, enc_f(:String, x.html, x.flags, 4)::binary, enc_f(:Long, x.poster_photo_id, x.flags, 16)::binary, encode(:Int, x.w)::binary, encode(:Int, x.h)::binary, encode(x.caption)::binary>> | |
def encode(%PageBlockEmbedPost{} = x), do: <<233, 123, 44, 41, encode(:String, x.url)::binary, encode(:Long, x.webpage_id)::binary, encode(:Long, x.author_photo_id)::binary, encode(:String, x.author)::binary, encode(:Int, x.date)::binary, enc_v(x.blocks)::binary, encode(x.caption)::binary>> | |
def encode(%PageBlockCollage{} = x), do: <<79, 28, 179, 8, enc_v(x.items)::binary, encode(x.caption)::binary>> | |
def encode(%PageBlockSlideshow{} = x), do: <<99, 137, 12, 19, enc_v(x.items)::binary, encode(x.caption)::binary>> | |
def encode(%PagePart{} = x), do: <<68, 108, 238, 141, enc_v(x.blocks)::binary, enc_v(x.photos)::binary, enc_v(x.videos)::binary>> | |
def encode(%PageFull{} = x), do: <<105, 157, 161, 215, enc_v(x.blocks)::binary, enc_v(x.photos)::binary, enc_v(x.videos)::binary>> | |
def encode(%InputPhoneCall{} = x), do: <<237, 253, 54, 30, encode(:Long, x.id)::binary, encode(:Long, x.access_hash)::binary>> | |
def encode(%PhoneCallEmpty{} = x), do: <<21, 201, 102, 83, encode(:Long, x.id)::binary>> | |
def encode(%PhoneCallWaiting{} = x), do: <<209, 74, 143, 27, encode(:Int, x.flags)::binary, encode(:Long, x.id)::binary, encode(:Long, x.access_hash)::binary, encode(:Int, x.date)::binary, encode(:Int, x.admin_id)::binary, encode(:Int, x.participant_id)::binary, encode(x.protocol)::binary, enc_f(:Int, x.receive_date, x.flags, 1)::binary>> | |
def encode(%PhoneCallRequested{} = x), do: <<232, 138, 68, 108, encode(:Long, x.id)::binary, encode(:Long, x.access_hash)::binary, encode(:Int, x.date)::binary, encode(:Int, x.admin_id)::binary, encode(:Int, x.participant_id)::binary, encode(:Bytes, x.g_a)::binary, encode(x.protocol)::binary>> | |
def encode(%PhoneCall{} = x), do: <<103, 171, 230, 255, encode(:Long, x.id)::binary, encode(:Long, x.access_hash)::binary, encode(:Int, x.date)::binary, encode(:Int, x.admin_id)::binary, encode(:Int, x.participant_id)::binary, encode(:Bytes, x.g_a_or_b)::binary, encode(:Long, x.key_fingerprint)::binary, encode(x.protocol)::binary, encode(x.connection)::binary, enc_v(x.alternative_connections)::binary, encode(:Int, x.start_date)::binary>> | |
def encode(%PhoneCallDiscarded{} = x), do: <<225, 77, 202, 80, encode(:Int, x.flags)::binary, encode(:Long, x.id)::binary, enc_f(x.reason, x.flags, 1)::binary, enc_f(:Int, x.duration, x.flags, 2)::binary>> | |
def encode(%PhoneConnection{} = x), do: <<192, 23, 76, 157, encode(:Long, x.id)::binary, encode(:String, x.ip)::binary, encode(:String, x.ipv6)::binary, encode(:Int, x.port)::binary, encode(:Bytes, x.peer_tag)::binary>> | |
def encode(%PhoneCallProtocol{} = x), do: <<203, 53, 187, 162, encode(:Int, x.flags)::binary, enc_f(:True, x.udp_p2p, x.flags, 1)::binary, enc_f(:True, x.udp_reflector, x.flags, 2)::binary, encode(:Int, x.min_layer)::binary, encode(:Int, x.max_layer)::binary>> | |
def encode(%Phone.PhoneCall{} = x), do: <<64, 225, 130, 236, encode(x.phone_call)::binary, enc_v(x.users)::binary>> | |
def encode(%PhoneCallDiscardReasonMissed{}), do: <<1, 35, 228, 133>> | |
def encode(%PhoneCallDiscardReasonDisconnect{}), do: <<160, 193, 149, 224>> | |
def encode(%PhoneCallDiscardReasonHangup{}), do: <<144, 198, 173, 87>> | |
def encode(%PhoneCallDiscardReasonBusy{}), do: <<201, 232, 247, 250>> | |
# Decoders | |
def decode(<<99, 36, 22, 5, bin::binary>>) do | |
{nonce, bin} = decode(:Int128, bin) | |
{server_nonce, bin} = decode(:Int128, bin) | |
{pq, bin} = decode(:String, bin) | |
{server_public_key_fingerprints, bin} = decode([:Long], bin) | |
{%ResPQ{nonce: nonce, server_nonce: server_nonce, pq: pq, server_public_key_fingerprints: server_public_key_fingerprints}, bin} | |
end | |
def decode(<<236, 90, 201, 131, bin::binary>>) do | |
{pq, bin} = decode(:String, bin) | |
{p, bin} = decode(:String, bin) | |
{q, bin} = decode(:String, bin) | |
{nonce, bin} = decode(:Int128, bin) | |
{server_nonce, bin} = decode(:Int128, bin) | |
{new_nonce, bin} = decode(:Int256, bin) | |
{%P_Q_Inner_Data{pq: pq, p: p, q: q, nonce: nonce, server_nonce: server_nonce, new_nonce: new_nonce}, bin} | |
end | |
def decode(<<93, 4, 203, 121, bin::binary>>) do | |
{nonce, bin} = decode(:Int128, bin) | |
{server_nonce, bin} = decode(:Int128, bin) | |
{new_nonce_hash, bin} = decode(:Int128, bin) | |
{%Server_DH_Params_Fail{nonce: nonce, server_nonce: server_nonce, new_nonce_hash: new_nonce_hash}, bin} | |
end | |
def decode(<<92, 7, 232, 208, bin::binary>>) do | |
{nonce, bin} = decode(:Int128, bin) | |
{server_nonce, bin} = decode(:Int128, bin) | |
{encrypted_answer, bin} = decode(:String, bin) | |
{%Server_DH_Params_Ok{nonce: nonce, server_nonce: server_nonce, encrypted_answer: encrypted_answer}, bin} | |
end | |
def decode(<<186, 13, 137, 181, bin::binary>>) do | |
{nonce, bin} = decode(:Int128, bin) | |
{server_nonce, bin} = decode(:Int128, bin) | |
{g, bin} = decode(:Int, bin) | |
{dh_prime, bin} = decode(:String, bin) | |
{g_a, bin} = decode(:String, bin) | |
{server_time, bin} = decode(:Int, bin) | |
{%Server_DH_Inner_Data{nonce: nonce, server_nonce: server_nonce, g: g, dh_prime: dh_prime, g_a: g_a, server_time: server_time}, bin} | |
end | |
def decode(<<84, 182, 67, 102, bin::binary>>) do | |
{nonce, bin} = decode(:Int128, bin) | |
{server_nonce, bin} = decode(:Int128, bin) | |
{retry_id, bin} = decode(:Long, bin) | |
{g_b, bin} = decode(:String, bin) | |
{%Client_DH_Inner_Data{nonce: nonce, server_nonce: server_nonce, retry_id: retry_id, g_b: g_b}, bin} | |
end | |
def decode(<<52, 247, 203, 59, bin::binary>>) do | |
{nonce, bin} = decode(:Int128, bin) | |
{server_nonce, bin} = decode(:Int128, bin) | |
{new_nonce_hash1, bin} = decode(:Int128, bin) | |
{%Dh_Gen_Ok{nonce: nonce, server_nonce: server_nonce, new_nonce_hash1: new_nonce_hash1}, bin} | |
end | |
def decode(<<185, 31, 220, 70, bin::binary>>) do | |
{nonce, bin} = decode(:Int128, bin) | |
{server_nonce, bin} = decode(:Int128, bin) | |
{new_nonce_hash2, bin} = decode(:Int128, bin) | |
{%Dh_Gen_Retry{nonce: nonce, server_nonce: server_nonce, new_nonce_hash2: new_nonce_hash2}, bin} | |
end | |
def decode(<<2, 174, 157, 166, bin::binary>>) do | |
{nonce, bin} = decode(:Int128, bin) | |
{server_nonce, bin} = decode(:Int128, bin) | |
{new_nonce_hash3, bin} = decode(:Int128, bin) | |
{%Dh_Gen_Fail{nonce: nonce, server_nonce: server_nonce, new_nonce_hash3: new_nonce_hash3}, bin} | |
end | |
def decode(<<89, 180, 214, 98, bin::binary>>) do | |
{msg_ids, bin} = decode([:Long], bin) | |
{%Msgs_Ack{msg_ids: msg_ids}, bin} | |
end | |
def decode(<<17, 248, 239, 167, bin::binary>>) do | |
{bad_msg_id, bin} = decode(:Long, bin) | |
{bad_msg_seqno, bin} = decode(:Int, bin) | |
{error_code, bin} = decode(:Int, bin) | |
{%Bad_Msg_Notification{bad_msg_id: bad_msg_id, bad_msg_seqno: bad_msg_seqno, error_code: error_code}, bin} | |
end | |
def decode(<<123, 68, 171, 237, bin::binary>>) do | |
{bad_msg_id, bin} = decode(:Long, bin) | |
{bad_msg_seqno, bin} = decode(:Int, bin) | |
{error_code, bin} = decode(:Int, bin) | |
{new_server_salt, bin} = decode(:Long, bin) | |
{%Bad_Server_Salt{bad_msg_id: bad_msg_id, bad_msg_seqno: bad_msg_seqno, error_code: error_code, new_server_salt: new_server_salt}, bin} | |
end | |
def decode(<<82, 251, 105, 218, bin::binary>>) do | |
{msg_ids, bin} = decode([:Long], bin) | |
{%Msgs_State_Req{msg_ids: msg_ids}, bin} | |
end | |
def decode(<<125, 181, 222, 4, bin::binary>>) do | |
{req_msg_id, bin} = decode(:Long, bin) | |
{info, bin} = decode(:String, bin) | |
{%Msgs_State_Info{req_msg_id: req_msg_id, info: info}, bin} | |
end | |
def decode(<<49, 209, 192, 140, bin::binary>>) do | |
{msg_ids, bin} = decode([:Long], bin) | |
{info, bin} = decode(:String, bin) | |
{%Msgs_All_Info{msg_ids: msg_ids, info: info}, bin} | |
end | |
def decode(<<198, 62, 109, 39, bin::binary>>) do | |
{msg_id, bin} = decode(:Long, bin) | |
{answer_msg_id, bin} = decode(:Long, bin) | |
{bytes, bin} = decode(:Int, bin) | |
{status, bin} = decode(:Int, bin) | |
{%Msg_Detailed_Info{msg_id: msg_id, answer_msg_id: answer_msg_id, bytes: bytes, status: status}, bin} | |
end | |
def decode(<<223, 182, 157, 128, bin::binary>>) do | |
{answer_msg_id, bin} = decode(:Long, bin) | |
{bytes, bin} = decode(:Int, bin) | |
{status, bin} = decode(:Int, bin) | |
{%Msg_New_Detailed_Info{answer_msg_id: answer_msg_id, bytes: bytes, status: status}, bin} | |
end | |
def decode(<<8, 26, 134, 125, bin::binary>>) do | |
{msg_ids, bin} = decode([:Long], bin) | |
{%Msg_Resend_Req{msg_ids: msg_ids}, bin} | |
end | |
def decode(<<1, 109, 92, 243, bin::binary>>) do | |
{req_msg_id, bin} = decode(:Long, bin) | |
{result, bin} = decode(bin) | |
{%Rpc_Result{req_msg_id: req_msg_id, result: result}, bin} | |
end | |
def decode(<<25, 202, 68, 33, bin::binary>>) do | |
{error_code, bin} = decode(:Int, bin) | |
{error_message, bin} = decode(:String, bin) | |
{%Rpc_Error{error_code: error_code, error_message: error_message}, bin} | |
end | |
def decode(<<110, 211, 42, 94, bin::binary>>), do: {%Rpc_Answer_Unknown{}, bin} | |
def decode(<<134, 229, 120, 205, bin::binary>>), do: {%Rpc_Answer_Dropped_Running{}, bin} | |
def decode(<<183, 216, 58, 164, bin::binary>>) do | |
{msg_id, bin} = decode(:Long, bin) | |
{seq_no, bin} = decode(:Int, bin) | |
{bytes, bin} = decode(:Int, bin) | |
{%Rpc_Answer_Dropped{msg_id: msg_id, seq_no: seq_no, bytes: bytes}, bin} | |
end | |
def decode(<<220, 217, 73, 9, bin::binary>>) do | |
{valid_since, bin} = decode(:Int, bin) | |
{valid_until, bin} = decode(:Int, bin) | |
{salt, bin} = decode(:Long, bin) | |
{%Future_Salt{valid_since: valid_since, valid_until: valid_until, salt: salt}, bin} | |
end | |
def decode(<<149, 8, 80, 174, bin::binary>>) do | |
{req_msg_id, bin} = decode(:Long, bin) | |
{now, bin} = decode(:Int, bin) | |
{salts, bin} = decode([:Future_Salt], bin) | |
{%Future_Salts{req_msg_id: req_msg_id, now: now, salts: salts}, bin} | |
end | |
def decode(<<197, 115, 119, 52, bin::binary>>) do | |
{msg_id, bin} = decode(:Long, bin) | |
{ping_id, bin} = decode(:Long, bin) | |
{%Pong{msg_id: msg_id, ping_id: ping_id}, bin} | |
end | |
def decode(<<252, 69, 32, 226, bin::binary>>) do | |
{session_id, bin} = decode(:Long, bin) | |
{%Destroy_Session_Ok{session_id: session_id}, bin} | |
end | |
def decode(<<201, 80, 211, 98, bin::binary>>) do | |
{session_id, bin} = decode(:Long, bin) | |
{%Destroy_Session_None{session_id: session_id}, bin} | |
end | |
def decode(<<8, 9, 194, 158, bin::binary>>) do | |
{first_msg_id, bin} = decode(:Long, bin) | |
{unique_id, bin} = decode(:Long, bin) | |
{server_salt, bin} = decode(:Long, bin) | |
{%New_Session_Created{first_msg_id: first_msg_id, unique_id: unique_id, server_salt: server_salt}, bin} | |
end | |
def decode(<<161, 207, 114, 48, bin::binary>>) do | |
{packed_data, bin} = decode(:String, bin) | |
{%Gzip_Packed{packed_data: packed_data}, bin} | |
end | |
def decode(<<159, 53, 153, 146, bin::binary>>) do | |
{max_delay, bin} = decode(:Int, bin) | |
{wait_after, bin} = decode(:Int, bin) | |
{max_wait, bin} = decode(:Int, bin) | |
{%Http_Wait{max_delay: max_delay, wait_after: wait_after, max_wait: max_wait}, bin} | |
end | |
def decode(<<55, 151, 121, 188, bin::binary>>), do: {%BoolFalse{}, bin} | |
def decode(<<181, 117, 114, 153, bin::binary>>), do: {%BoolTrue{}, bin} | |
def decode(<<57, 211, 237, 63, bin::binary>>), do: {%True{}, bin} | |
def decode(<<187, 249, 185, 196, bin::binary>>) do | |
{code, bin} = decode(:Int, bin) | |
{text, bin} = decode(:String, bin) | |
{%Error{code: code, text: text}, bin} | |
end | |
def decode(<<204, 11, 115, 86, bin::binary>>), do: {%Null{}, bin} | |
def decode(<<234, 24, 59, 127, bin::binary>>), do: {%InputPeerEmpty{}, bin} | |
def decode(<<201, 126, 160, 125, bin::binary>>), do: {%InputPeerSelf{}, bin} | |
def decode(<<99, 232, 155, 23, bin::binary>>) do | |
{chat_id, bin} = decode(:Int, bin) | |
{%InputPeerChat{chat_id: chat_id}, bin} | |
end | |
def decode(<<230, 125, 142, 123, bin::binary>>) do | |
{user_id, bin} = decode(:Int, bin) | |
{access_hash, bin} = decode(:Long, bin) | |
{%InputPeerUser{user_id: user_id, access_hash: access_hash}, bin} | |
end | |
def decode(<<248, 174, 173, 32, bin::binary>>) do | |
{channel_id, bin} = decode(:Int, bin) | |
{access_hash, bin} = decode(:Long, bin) | |
{%InputPeerChannel{channel_id: channel_id, access_hash: access_hash}, bin} | |
end | |
def decode(<<207, 134, 136, 185, bin::binary>>), do: {%InputUserEmpty{}, bin} | |
def decode(<<63, 177, 193, 247, bin::binary>>), do: {%InputUserSelf{}, bin} | |
def decode(<<22, 40, 41, 216, bin::binary>>) do | |
{user_id, bin} = decode(:Int, bin) | |
{access_hash, bin} = decode(:Long, bin) | |
{%InputUser{user_id: user_id, access_hash: access_hash}, bin} | |
end | |
def decode(<<244, 183, 146, 243, bin::binary>>) do | |
{client_id, bin} = decode(:Long, bin) | |
{phone, bin} = decode(:String, bin) | |
{first_name, bin} = decode(:String, bin) | |
{last_name, bin} = decode(:String, bin) | |
{%InputPhoneContact{client_id: client_id, phone: phone, first_name: first_name, last_name: last_name}, bin} | |
end | |
def decode(<<127, 242, 47, 245, bin::binary>>) do | |
{id, bin} = decode(:Long, bin) | |
{parts, bin} = decode(:Int, bin) | |
{name, bin} = decode(:String, bin) | |
{md5_checksum, bin} = decode(:String, bin) | |
{%InputFile{id: id, parts: parts, name: name, md5_checksum: md5_checksum}, bin} | |
end | |
def decode(<<181, 11, 79, 250, bin::binary>>) do | |
{id, bin} = decode(:Long, bin) | |
{parts, bin} = decode(:Int, bin) | |
{name, bin} = decode(:String, bin) | |
{%InputFileBig{id: id, parts: parts, name: name}, bin} | |
end | |
def decode(<<127, 245, 100, 150, bin::binary>>), do: {%InputMediaEmpty{}, bin} | |
def decode(<<241, 154, 12, 99, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{file, bin} = decode(bin) | |
{caption, bin} = decode(:String, bin) | |
{stickers, bin} = decode([:InputDocument], bin, flags, 1) # 0 | |
{%InputMediaUploadedPhoto{flags: flags, file: file, caption: caption, stickers: stickers}, bin} | |
end | |
def decode(<<243, 180, 191, 233, bin::binary>>) do | |
{id, bin} = decode(bin) | |
{caption, bin} = decode(:String, bin) | |
{%InputMediaPhoto{id: id, caption: caption}, bin} | |
end | |
def decode(<<68, 65, 196, 249, bin::binary>>) do | |
{geo_point, bin} = decode(bin) | |
{%InputMediaGeoPoint{geo_point: geo_point}, bin} | |
end | |
def decode(<<135, 89, 228, 166, bin::binary>>) do | |
{phone_number, bin} = decode(:String, bin) | |
{first_name, bin} = decode(:String, bin) | |
{last_name, bin} = decode(:String, bin) | |
{%InputMediaContact{phone_number: phone_number, first_name: first_name, last_name: last_name}, bin} | |
end | |
def decode(<<233, 241, 112, 208, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{file, bin} = decode(bin) | |
{mime_type, bin} = decode(:String, bin) | |
{attributes, bin} = decode([:DocumentAttribute], bin) | |
{caption, bin} = decode(:String, bin) | |
{stickers, bin} = decode([:InputDocument], bin, flags, 1) # 0 | |
{%InputMediaUploadedDocument{flags: flags, file: file, mime_type: mime_type, attributes: attributes, caption: caption, stickers: stickers}, bin} | |
end | |
def decode(<<174, 140, 216, 80, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{file, bin} = decode(bin) | |
{thumb, bin} = decode(bin) | |
{mime_type, bin} = decode(:String, bin) | |
{attributes, bin} = decode([:DocumentAttribute], bin) | |
{caption, bin} = decode(:String, bin) | |
{stickers, bin} = decode([:InputDocument], bin, flags, 1) # 0 | |
{%InputMediaUploadedThumbDocument{flags: flags, file: file, thumb: thumb, mime_type: mime_type, attributes: attributes, caption: caption, stickers: stickers}, bin} | |
end | |
def decode(<<156, 242, 119, 26, bin::binary>>) do | |
{id, bin} = decode(bin) | |
{caption, bin} = decode(:String, bin) | |
{%InputMediaDocument{id: id, caption: caption}, bin} | |
end | |
def decode(<<26, 168, 39, 40, bin::binary>>) do | |
{geo_point, bin} = decode(bin) | |
{title, bin} = decode(:String, bin) | |
{address, bin} = decode(:String, bin) | |
{provider, bin} = decode(:String, bin) | |
{venue_id, bin} = decode(:String, bin) | |
{%InputMediaVenue{geo_point: geo_point, title: title, address: address, provider: provider, venue_id: venue_id}, bin} | |
end | |
def decode(<<253, 176, 67, 72, bin::binary>>) do | |
{url, bin} = decode(:String, bin) | |
{q, bin} = decode(:String, bin) | |
{%InputMediaGifExternal{url: url, q: q}, bin} | |
end | |
def decode(<<24, 79, 95, 181, bin::binary>>) do | |
{url, bin} = decode(:String, bin) | |
{caption, bin} = decode(:String, bin) | |
{%InputMediaPhotoExternal{url: url, caption: caption}, bin} | |
end | |
def decode(<<124, 96, 233, 229, bin::binary>>) do | |
{url, bin} = decode(:String, bin) | |
{caption, bin} = decode(:String, bin) | |
{%InputMediaDocumentExternal{url: url, caption: caption}, bin} | |
end | |
def decode(<<243, 67, 63, 211, bin::binary>>) do | |
{id, bin} = decode(bin) | |
{%InputMediaGame{id: id}, bin} | |
end | |
def decode(<<87, 143, 164, 28, bin::binary>>), do: {%InputChatPhotoEmpty{}, bin} | |
def decode(<<180, 85, 124, 146, bin::binary>>) do | |
{file, bin} = decode(bin) | |
{%InputChatUploadedPhoto{file: file}, bin} | |
end | |
def decode(<<55, 173, 83, 137, bin::binary>>) do | |
{id, bin} = decode(bin) | |
{%InputChatPhoto{id: id}, bin} | |
end | |
def decode(<<214, 35, 193, 228, bin::binary>>), do: {%InputGeoPointEmpty{}, bin} | |
def decode(<<201, 172, 183, 243, bin::binary>>) do | |
{lat, bin} = decode(:Double, bin) | |
{long, bin} = decode(:Double, bin) | |
{%InputGeoPoint{lat: lat, long: long}, bin} | |
end | |
def decode(<<13, 191, 215, 28, bin::binary>>), do: {%InputPhotoEmpty{}, bin} | |
def decode(<<196, 198, 149, 251, bin::binary>>) do | |
{id, bin} = decode(:Long, bin) | |
{access_hash, bin} = decode(:Long, bin) | |
{%InputPhoto{id: id, access_hash: access_hash}, bin} | |
end | |
def decode(<<150, 113, 99, 20, bin::binary>>) do | |
{volume_id, bin} = decode(:Long, bin) | |
{local_id, bin} = decode(:Int, bin) | |
{secret, bin} = decode(:Long, bin) | |
{%InputFileLocation{volume_id: volume_id, local_id: local_id, secret: secret}, bin} | |
end | |
def decode(<<85, 93, 35, 245, bin::binary>>) do | |
{id, bin} = decode(:Long, bin) | |
{access_hash, bin} = decode(:Long, bin) | |
{%InputEncryptedFileLocation{id: id, access_hash: access_hash}, bin} | |
end | |
def decode(<<36, 7, 15, 67, bin::binary>>) do | |
{id, bin} = decode(:Long, bin) | |
{access_hash, bin} = decode(:Long, bin) | |
{version, bin} = decode(:Int, bin) | |
{%InputDocumentFileLocation{id: id, access_hash: access_hash, version: version}, bin} | |
end | |
def decode(<<168, 86, 6, 119, bin::binary>>) do | |
{time, bin} = decode(:Double, bin) | |
{type, bin} = decode(:String, bin) | |
{peer, bin} = decode(:Long, bin) | |
{data, bin} = decode(:String, bin) | |
{%InputAppEvent{time: time, type: type, peer: peer, data: data}, bin} | |
end | |
def decode(<<109, 188, 177, 157, bin::binary>>) do | |
{user_id, bin} = decode(:Int, bin) | |
{%PeerUser{user_id: user_id}, bin} | |
end | |
def decode(<<187, 229, 208, 186, bin::binary>>) do | |
{chat_id, bin} = decode(:Int, bin) | |
{%PeerChat{chat_id: chat_id}, bin} | |
end | |
def decode(<<50, 229, 221, 189, bin::binary>>) do | |
{channel_id, bin} = decode(:Int, bin) | |
{%PeerChannel{channel_id: channel_id}, bin} | |
end | |
def decode(<<5, 59, 150, 170, bin::binary>>), do: {%Storage.FileUnknown{}, bin} | |
def decode(<<14, 254, 126, 0, bin::binary>>), do: {%Storage.FileJpeg{}, bin} | |
def decode(<<223, 170, 225, 202, bin::binary>>), do: {%Storage.FileGif{}, bin} | |
def decode(<<192, 99, 79, 10, bin::binary>>), do: {%Storage.FilePng{}, bin} | |
def decode(<<141, 80, 30, 174, bin::binary>>), do: {%Storage.FilePdf{}, bin} | |
def decode(<<119, 6, 138, 82, bin::binary>>), do: {%Storage.FileMp3{}, bin} | |
def decode(<<188, 235, 9, 75, bin::binary>>), do: {%Storage.FileMov{}, bin} | |
def decode(<<82, 111, 188, 64, bin::binary>>), do: {%Storage.FilePartial{}, bin} | |
def decode(<<228, 160, 206, 179, bin::binary>>), do: {%Storage.FileMp4{}, bin} | |
def decode(<<76, 70, 129, 16, bin::binary>>), do: {%Storage.FileWebp{}, bin} | |
def decode(<<70, 107, 89, 124, bin::binary>>) do | |
{volume_id, bin} = decode(:Long, bin) | |
{local_id, bin} = decode(:Int, bin) | |
{secret, bin} = decode(:Long, bin) | |
{%FileLocationUnavailable{volume_id: volume_id, local_id: local_id, secret: secret}, bin} | |
end | |
def decode(<<118, 144, 214, 83, bin::binary>>) do | |
{dc_id, bin} = decode(:Int, bin) | |
{volume_id, bin} = decode(:Long, bin) | |
{local_id, bin} = decode(:Int, bin) | |
{secret, bin} = decode(:Long, bin) | |
{%FileLocation{dc_id: dc_id, volume_id: volume_id, local_id: local_id, secret: secret}, bin} | |
end | |
def decode(<<186, 80, 2, 32, bin::binary>>) do | |
{id, bin} = decode(:Int, bin) | |
{%UserEmpty{id: id}, bin} | |
end | |
def decode(<<154, 151, 13, 209, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{self, bin} = decode(:True, bin, flags, 1024) # 10 | |
{contact, bin} = decode(:True, bin, flags, 2048) # 11 | |
{mutual_contact, bin} = decode(:True, bin, flags, 4096) # 12 | |
{deleted, bin} = decode(:True, bin, flags, 8192) # 13 | |
{bot, bin} = decode(:True, bin, flags, 16384) # 14 | |
{bot_chat_history, bin} = decode(:True, bin, flags, 32768) # 15 | |
{bot_nochats, bin} = decode(:True, bin, flags, 65536) # 16 | |
{verified, bin} = decode(:True, bin, flags, 131072) # 17 | |
{restricted, bin} = decode(:True, bin, flags, 262144) # 18 | |
{min, bin} = decode(:True, bin, flags, 1048576) # 20 | |
{bot_inline_geo, bin} = decode(:True, bin, flags, 2097152) # 21 | |
{id, bin} = decode(:Int, bin) | |
{access_hash, bin} = decode(:Long, bin, flags, 1) # 0 | |
{first_name, bin} = decode(:String, bin, flags, 2) # 1 | |
{last_name, bin} = decode(:String, bin, flags, 4) # 2 | |
{username, bin} = decode(:String, bin, flags, 8) # 3 | |
{phone, bin} = decode(:String, bin, flags, 16) # 4 | |
{photo, bin} = decode(bin, flags, 32) # 5 | |
{status, bin} = decode(bin, flags, 64) # 6 | |
{bot_info_version, bin} = decode(:Int, bin, flags, 16384) # 14 | |
{restriction_reason, bin} = decode(:String, bin, flags, 262144) # 18 | |
{bot_inline_placeholder, bin} = decode(:String, bin, flags, 524288) # 19 | |
{%User{flags: flags, self: self, contact: contact, mutual_contact: mutual_contact, deleted: deleted, bot: bot, bot_chat_history: bot_chat_history, bot_nochats: bot_nochats, verified: verified, restricted: restricted, min: min, bot_inline_geo: bot_inline_geo, id: id, access_hash: access_hash, first_name: first_name, last_name: last_name, username: username, phone: phone, photo: photo, status: status, bot_info_version: bot_info_version, restriction_reason: restriction_reason, bot_inline_placeholder: bot_inline_placeholder}, bin} | |
end | |
def decode(<<225, 186, 17, 79, bin::binary>>), do: {%UserProfilePhotoEmpty{}, bin} | |
def decode(<<200, 216, 89, 213, bin::binary>>) do | |
{photo_id, bin} = decode(:Long, bin) | |
{photo_small, bin} = decode(bin) | |
{photo_big, bin} = decode(bin) | |
{%UserProfilePhoto{photo_id: photo_id, photo_small: photo_small, photo_big: photo_big}, bin} | |
end | |
def decode(<<73, 80, 208, 9, bin::binary>>), do: {%UserStatusEmpty{}, bin} | |
def decode(<<73, 57, 185, 237, bin::binary>>) do | |
{expires, bin} = decode(:Int, bin) | |
{%UserStatusOnline{expires: expires}, bin} | |
end | |
def decode(<<63, 112, 140, 0, bin::binary>>) do | |
{was_online, bin} = decode(:Int, bin) | |
{%UserStatusOffline{was_online: was_online}, bin} | |
end | |
def decode(<<241, 66, 111, 226, bin::binary>>), do: {%UserStatusRecently{}, bin} | |
def decode(<<252, 9, 191, 7, bin::binary>>), do: {%UserStatusLastWeek{}, bin} | |
def decode(<<66, 199, 235, 119, bin::binary>>), do: {%UserStatusLastMonth{}, bin} | |
def decode(<<0, 216, 162, 155, bin::binary>>) do | |
{id, bin} = decode(:Int, bin) | |
{%ChatEmpty{id: id}, bin} | |
end | |
def decode(<<84, 221, 28, 217, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{creator, bin} = decode(:True, bin, flags, 1) # 0 | |
{kicked, bin} = decode(:True, bin, flags, 2) # 1 | |
{left, bin} = decode(:True, bin, flags, 4) # 2 | |
{admins_enabled, bin} = decode(:True, bin, flags, 8) # 3 | |
{admin, bin} = decode(:True, bin, flags, 16) # 4 | |
{deactivated, bin} = decode(:True, bin, flags, 32) # 5 | |
{id, bin} = decode(:Int, bin) | |
{title, bin} = decode(:String, bin) | |
{photo, bin} = decode(bin) | |
{participants_count, bin} = decode(:Int, bin) | |
{date, bin} = decode(:Int, bin) | |
{version, bin} = decode(:Int, bin) | |
{migrated_to, bin} = decode(bin, flags, 64) # 6 | |
{%Chat{flags: flags, creator: creator, kicked: kicked, left: left, admins_enabled: admins_enabled, admin: admin, deactivated: deactivated, id: id, title: title, photo: photo, participants_count: participants_count, date: date, version: version, migrated_to: migrated_to}, bin} | |
end | |
def decode(<<219, 139, 50, 7, bin::binary>>) do | |
{id, bin} = decode(:Int, bin) | |
{title, bin} = decode(:String, bin) | |
{%ChatForbidden{id: id, title: title}, bin} | |
end | |
def decode(<<82, 202, 77, 161, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{creator, bin} = decode(:True, bin, flags, 1) # 0 | |
{kicked, bin} = decode(:True, bin, flags, 2) # 1 | |
{left, bin} = decode(:True, bin, flags, 4) # 2 | |
{editor, bin} = decode(:True, bin, flags, 8) # 3 | |
{moderator, bin} = decode(:True, bin, flags, 16) # 4 | |
{broadcast, bin} = decode(:True, bin, flags, 32) # 5 | |
{verified, bin} = decode(:True, bin, flags, 128) # 7 | |
{megagroup, bin} = decode(:True, bin, flags, 256) # 8 | |
{restricted, bin} = decode(:True, bin, flags, 512) # 9 | |
{democracy, bin} = decode(:True, bin, flags, 1024) # 10 | |
{signatures, bin} = decode(:True, bin, flags, 2048) # 11 | |
{min, bin} = decode(:True, bin, flags, 4096) # 12 | |
{id, bin} = decode(:Int, bin) | |
{access_hash, bin} = decode(:Long, bin, flags, 8192) # 13 | |
{title, bin} = decode(:String, bin) | |
{username, bin} = decode(:String, bin, flags, 64) # 6 | |
{photo, bin} = decode(bin) | |
{date, bin} = decode(:Int, bin) | |
{version, bin} = decode(:Int, bin) | |
{restriction_reason, bin} = decode(:String, bin, flags, 512) # 9 | |
{%Channel{flags: flags, creator: creator, kicked: kicked, left: left, editor: editor, moderator: moderator, broadcast: broadcast, verified: verified, megagroup: megagroup, restricted: restricted, democracy: democracy, signatures: signatures, min: min, id: id, access_hash: access_hash, title: title, username: username, photo: photo, date: date, version: version, restriction_reason: restriction_reason}, bin} | |
end | |
def decode(<<79, 120, 55, 133, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{broadcast, bin} = decode(:True, bin, flags, 32) # 5 | |
{megagroup, bin} = decode(:True, bin, flags, 256) # 8 | |
{id, bin} = decode(:Int, bin) | |
{access_hash, bin} = decode(:Long, bin) | |
{title, bin} = decode(:String, bin) | |
{%ChannelForbidden{flags: flags, broadcast: broadcast, megagroup: megagroup, id: id, access_hash: access_hash, title: title}, bin} | |
end | |
def decode(<<20, 166, 2, 46, bin::binary>>) do | |
{id, bin} = decode(:Int, bin) | |
{participants, bin} = decode(bin) | |
{chat_photo, bin} = decode(bin) | |
{notify_settings, bin} = decode(bin) | |
{exported_invite, bin} = decode(bin) | |
{bot_info, bin} = decode([:BotInfo], bin) | |
{%ChatFull{id: id, participants: participants, chat_photo: chat_photo, notify_settings: notify_settings, exported_invite: exported_invite, bot_info: bot_info}, bin} | |
end | |
def decode(<<47, 81, 213, 195, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{can_view_participants, bin} = decode(:True, bin, flags, 8) # 3 | |
{can_set_username, bin} = decode(:True, bin, flags, 64) # 6 | |
{id, bin} = decode(:Int, bin) | |
{about, bin} = decode(:String, bin) | |
{participants_count, bin} = decode(:Int, bin, flags, 1) # 0 | |
{admins_count, bin} = decode(:Int, bin, flags, 2) # 1 | |
{kicked_count, bin} = decode(:Int, bin, flags, 4) # 2 | |
{read_inbox_max_id, bin} = decode(:Int, bin) | |
{read_outbox_max_id, bin} = decode(:Int, bin) | |
{unread_count, bin} = decode(:Int, bin) | |
{chat_photo, bin} = decode(bin) | |
{notify_settings, bin} = decode(bin) | |
{exported_invite, bin} = decode(bin) | |
{bot_info, bin} = decode([:BotInfo], bin) | |
{migrated_from_chat_id, bin} = decode(:Int, bin, flags, 16) # 4 | |
{migrated_from_max_id, bin} = decode(:Int, bin, flags, 16) # 4 | |
{pinned_msg_id, bin} = decode(:Int, bin, flags, 32) # 5 | |
{%ChannelFull{flags: flags, can_view_participants: can_view_participants, can_set_username: can_set_username, id: id, about: about, participants_count: participants_count, admins_count: admins_count, kicked_count: kicked_count, read_inbox_max_id: read_inbox_max_id, read_outbox_max_id: read_outbox_max_id, unread_count: unread_count, chat_photo: chat_photo, notify_settings: notify_settings, exported_invite: exported_invite, bot_info: bot_info, migrated_from_chat_id: migrated_from_chat_id, migrated_from_max_id: migrated_from_max_id, pinned_msg_id: pinned_msg_id}, bin} | |
end | |
def decode(<<62, 73, 215, 200, bin::binary>>) do | |
{user_id, bin} = decode(:Int, bin) | |
{inviter_id, bin} = decode(:Int, bin) | |
{date, bin} = decode(:Int, bin) | |
{%ChatParticipant{user_id: user_id, inviter_id: inviter_id, date: date}, bin} | |
end | |
def decode(<<138, 83, 19, 218, bin::binary>>) do | |
{user_id, bin} = decode(:Int, bin) | |
{%ChatParticipantCreator{user_id: user_id}, bin} | |
end | |
def decode(<<54, 228, 214, 226, bin::binary>>) do | |
{user_id, bin} = decode(:Int, bin) | |
{inviter_id, bin} = decode(:Int, bin) | |
{date, bin} = decode(:Int, bin) | |
{%ChatParticipantAdmin{user_id: user_id, inviter_id: inviter_id, date: date}, bin} | |
end | |
def decode(<<43, 12, 144, 252, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{chat_id, bin} = decode(:Int, bin) | |
{self_participant, bin} = decode(bin, flags, 1) # 0 | |
{%ChatParticipantsForbidden{flags: flags, chat_id: chat_id, self_participant: self_participant}, bin} | |
end | |
def decode(<<237, 15, 70, 63, bin::binary>>) do | |
{chat_id, bin} = decode(:Int, bin) | |
{participants, bin} = decode([:ChatParticipant], bin) | |
{version, bin} = decode(:Int, bin) | |
{%ChatParticipants{chat_id: chat_id, participants: participants, version: version}, bin} | |
end | |
def decode(<<28, 1, 193, 55, bin::binary>>), do: {%ChatPhotoEmpty{}, bin} | |
def decode(<<106, 39, 83, 97, bin::binary>>) do | |
{photo_small, bin} = decode(bin) | |
{photo_big, bin} = decode(bin) | |
{%ChatPhoto{photo_small: photo_small, photo_big: photo_big}, bin} | |
end | |
def decode(<<84, 222, 229, 131, bin::binary>>) do | |
{id, bin} = decode(:Int, bin) | |
{%MessageEmpty{id: id}, bin} | |
end | |
def decode(<<95, 228, 155, 192, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{out, bin} = decode(:True, bin, flags, 2) # 1 | |
{mentioned, bin} = decode(:True, bin, flags, 16) # 4 | |
{media_unread, bin} = decode(:True, bin, flags, 32) # 5 | |
{silent, bin} = decode(:True, bin, flags, 8192) # 13 | |
{post, bin} = decode(:True, bin, flags, 16384) # 14 | |
{id, bin} = decode(:Int, bin) | |
{from_id, bin} = decode(:Int, bin, flags, 256) # 8 | |
{to_id, bin} = decode(bin) | |
{fwd_from, bin} = decode(bin, flags, 4) # 2 | |
{via_bot_id, bin} = decode(:Int, bin, flags, 2048) # 11 | |
{reply_to_msg_id, bin} = decode(:Int, bin, flags, 8) # 3 | |
{date, bin} = decode(:Int, bin) | |
{message, bin} = decode(:String, bin) | |
{media, bin} = decode(bin, flags, 512) # 9 | |
{reply_markup, bin} = decode(bin, flags, 64) # 6 | |
{entities, bin} = decode([:MessageEntity], bin, flags, 128) # 7 | |
{views, bin} = decode(:Int, bin, flags, 1024) # 10 | |
{edit_date, bin} = decode(:Int, bin, flags, 32768) # 15 | |
{%Message{flags: flags, out: out, mentioned: mentioned, media_unread: media_unread, silent: silent, post: post, id: id, from_id: from_id, to_id: to_id, fwd_from: fwd_from, via_bot_id: via_bot_id, reply_to_msg_id: reply_to_msg_id, date: date, message: message, media: media, reply_markup: reply_markup, entities: entities, views: views, edit_date: edit_date}, bin} | |
end | |
def decode(<<246, 161, 25, 158, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{out, bin} = decode(:True, bin, flags, 2) # 1 | |
{mentioned, bin} = decode(:True, bin, flags, 16) # 4 | |
{media_unread, bin} = decode(:True, bin, flags, 32) # 5 | |
{silent, bin} = decode(:True, bin, flags, 8192) # 13 | |
{post, bin} = decode(:True, bin, flags, 16384) # 14 | |
{id, bin} = decode(:Int, bin) | |
{from_id, bin} = decode(:Int, bin, flags, 256) # 8 | |
{to_id, bin} = decode(bin) | |
{reply_to_msg_id, bin} = decode(:Int, bin, flags, 8) # 3 | |
{date, bin} = decode(:Int, bin) | |
{action, bin} = decode(bin) | |
{%MessageService{flags: flags, out: out, mentioned: mentioned, media_unread: media_unread, silent: silent, post: post, id: id, from_id: from_id, to_id: to_id, reply_to_msg_id: reply_to_msg_id, date: date, action: action}, bin} | |
end | |
def decode(<<32, 99, 237, 61, bin::binary>>), do: {%MessageMediaEmpty{}, bin} | |
def decode(<<61, 229, 140, 61, bin::binary>>) do | |
{photo, bin} = decode(bin) | |
{caption, bin} = decode(:String, bin) | |
{%MessageMediaPhoto{photo: photo, caption: caption}, bin} | |
end | |
def decode(<<116, 212, 224, 86, bin::binary>>) do | |
{geo, bin} = decode(bin) | |
{%MessageMediaGeo{geo: geo}, bin} | |
end | |
def decode(<<57, 47, 125, 94, bin::binary>>) do | |
{phone_number, bin} = decode(:String, bin) | |
{first_name, bin} = decode(:String, bin) | |
{last_name, bin} = decode(:String, bin) | |
{user_id, bin} = decode(:Int, bin) | |
{%MessageMediaContact{phone_number: phone_number, first_name: first_name, last_name: last_name, user_id: user_id}, bin} | |
end | |
def decode(<<158, 244, 132, 159, bin::binary>>), do: {%MessageMediaUnsupported{}, bin} | |
def decode(<<168, 46, 224, 243, bin::binary>>) do | |
{document, bin} = decode(bin) | |
{caption, bin} = decode(:String, bin) | |
{%MessageMediaDocument{document: document, caption: caption}, bin} | |
end | |
def decode(<<0, 214, 45, 163, bin::binary>>) do | |
{webpage, bin} = decode(bin) | |
{%MessageMediaWebPage{webpage: webpage}, bin} | |
end | |
def decode(<<31, 183, 18, 121, bin::binary>>) do | |
{geo, bin} = decode(bin) | |
{title, bin} = decode(:String, bin) | |
{address, bin} = decode(:String, bin) | |
{provider, bin} = decode(:String, bin) | |
{venue_id, bin} = decode(:String, bin) | |
{%MessageMediaVenue{geo: geo, title: title, address: address, provider: provider, venue_id: venue_id}, bin} | |
end | |
def decode(<<8, 144, 177, 253, bin::binary>>) do | |
{game, bin} = decode(bin) | |
{%MessageMediaGame{game: game}, bin} | |
end | |
def decode(<<176, 247, 174, 182, bin::binary>>), do: {%MessageActionEmpty{}, bin} | |
def decode(<<154, 139, 99, 166, bin::binary>>) do | |
{title, bin} = decode(:String, bin) | |
{users, bin} = decode([:Int], bin) | |
{%MessageActionChatCreate{title: title, users: users}, bin} | |
end | |
def decode(<<90, 206, 161, 181, bin::binary>>) do | |
{title, bin} = decode(:String, bin) | |
{%MessageActionChatEditTitle{title: title}, bin} | |
end | |
def decode(<<168, 19, 203, 127, bin::binary>>) do | |
{photo, bin} = decode(bin) | |
{%MessageActionChatEditPhoto{photo: photo}, bin} | |
end | |
def decode(<<239, 251, 227, 149, bin::binary>>), do: {%MessageActionChatDeletePhoto{}, bin} | |
def decode(<<55, 115, 138, 72, bin::binary>>) do | |
{users, bin} = decode([:Int], bin) | |
{%MessageActionChatAddUser{users: users}, bin} | |
end | |
def decode(<<12, 155, 174, 178, bin::binary>>) do | |
{user_id, bin} = decode(:Int, bin) | |
{%MessageActionChatDeleteUser{user_id: user_id}, bin} | |
end | |
def decode(<<232, 245, 156, 248, bin::binary>>) do | |
{inviter_id, bin} = decode(:Int, bin) | |
{%MessageActionChatJoinedByLink{inviter_id: inviter_id}, bin} | |
end | |
def decode(<<146, 172, 210, 149, bin::binary>>) do | |
{title, bin} = decode(:String, bin) | |
{%MessageActionChannelCreate{title: title}, bin} | |
end | |
def decode(<<33, 176, 189, 81, bin::binary>>) do | |
{channel_id, bin} = decode(:Int, bin) | |
{%MessageActionChatMigrateTo{channel_id: channel_id}, bin} | |
end | |
def decode(<<238, 234, 85, 176, bin::binary>>) do | |
{title, bin} = decode(:String, bin) | |
{chat_id, bin} = decode(:Int, bin) | |
{%MessageActionChannelMigrateFrom{title: title, chat_id: chat_id}, bin} | |
end | |
def decode(<<237, 56, 189, 148, bin::binary>>), do: {%MessageActionPinMessage{}, bin} | |
def decode(<<4, 182, 186, 159, bin::binary>>), do: {%MessageActionHistoryClear{}, bin} | |
def decode(<<118, 40, 167, 146, bin::binary>>) do | |
{game_id, bin} = decode(:Long, bin) | |
{score, bin} = decode(:Int, bin) | |
{%MessageActionGameScore{game_id: game_id, score: score}, bin} | |
end | |
def decode(<<127, 26, 225, 128, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{call_id, bin} = decode(:Long, bin) | |
{reason, bin} = decode(bin, flags, 1) # 0 | |
{duration, bin} = decode(:Int, bin, flags, 2) # 1 | |
{%MessageActionPhoneCall{flags: flags, call_id: call_id, reason: reason, duration: duration}, bin} | |
end | |
def decode(<<20, 186, 255, 102, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{pinned, bin} = decode(:True, bin, flags, 4) # 2 | |
{peer, bin} = decode(bin) | |
{top_message, bin} = decode(:Int, bin) | |
{read_inbox_max_id, bin} = decode(:Int, bin) | |
{read_outbox_max_id, bin} = decode(:Int, bin) | |
{unread_count, bin} = decode(:Int, bin) | |
{notify_settings, bin} = decode(bin) | |
{pts, bin} = decode(:Int, bin, flags, 1) # 0 | |
{draft, bin} = decode(bin, flags, 2) # 1 | |
{%Dialog{flags: flags, pinned: pinned, peer: peer, top_message: top_message, read_inbox_max_id: read_inbox_max_id, read_outbox_max_id: read_outbox_max_id, unread_count: unread_count, notify_settings: notify_settings, pts: pts, draft: draft}, bin} | |
end | |
def decode(<<45, 178, 49, 35, bin::binary>>) do | |
{id, bin} = decode(:Long, bin) | |
{%PhotoEmpty{id: id}, bin} | |
end | |
def decode(<<41, 221, 136, 146, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{has_stickers, bin} = decode(:True, bin, flags, 1) # 0 | |
{id, bin} = decode(:Long, bin) | |
{access_hash, bin} = decode(:Long, bin) | |
{date, bin} = decode(:Int, bin) | |
{sizes, bin} = decode([:PhotoSize], bin) | |
{%Photo{flags: flags, has_stickers: has_stickers, id: id, access_hash: access_hash, date: date, sizes: sizes}, bin} | |
end | |
def decode(<<60, 226, 23, 14, bin::binary>>) do | |
{type, bin} = decode(:String, bin) | |
{%PhotoSizeEmpty{type: type}, bin} | |
end | |
def decode(<<27, 182, 191, 119, bin::binary>>) do | |
{type, bin} = decode(:String, bin) | |
{location, bin} = decode(bin) | |
{w, bin} = decode(:Int, bin) | |
{h, bin} = decode(:Int, bin) | |
{size, bin} = decode(:Int, bin) | |
{%PhotoSize{type: type, location: location, w: w, h: h, size: size}, bin} | |
end | |
def decode(<<250, 52, 167, 233, bin::binary>>) do | |
{type, bin} = decode(:String, bin) | |
{location, bin} = decode(bin) | |
{w, bin} = decode(:Int, bin) | |
{h, bin} = decode(:Int, bin) | |
{bytes, bin} = decode(:Bytes, bin) | |
{%PhotoCachedSize{type: type, location: location, w: w, h: h, bytes: bytes}, bin} | |
end | |
def decode(<<95, 221, 23, 17, bin::binary>>), do: {%GeoPointEmpty{}, bin} | |
def decode(<<12, 215, 73, 32, bin::binary>>) do | |
{long, bin} = decode(:Double, bin) | |
{lat, bin} = decode(:Double, bin) | |
{%GeoPoint{long: long, lat: lat}, bin} | |
end | |
def decode(<<142, 162, 30, 129, bin::binary>>) do | |
{phone_registered, bin} = decode(bin) | |
{%Auth.CheckedPhone{phone_registered: phone_registered}, bin} | |
end | |
def decode(<<2, 37, 0, 94, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{phone_registered, bin} = decode(:True, bin, flags, 1) # 0 | |
{type, bin} = decode(bin) | |
{phone_code_hash, bin} = decode(:String, bin) | |
{next_type, bin} = decode(bin, flags, 2) # 1 | |
{timeout, bin} = decode(:Int, bin, flags, 4) # 2 | |
{%Auth.SentCode{flags: flags, phone_registered: phone_registered, type: type, phone_code_hash: phone_code_hash, next_type: next_type, timeout: timeout}, bin} | |
end | |
def decode(<<22, 9, 5, 205, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{tmp_sessions, bin} = decode(:Int, bin, flags, 1) # 0 | |
{user, bin} = decode(bin) | |
{%Auth.Authorization{flags: flags, tmp_sessions: tmp_sessions, user: user}, bin} | |
end | |
def decode(<<45, 156, 150, 223, bin::binary>>) do | |
{id, bin} = decode(:Int, bin) | |
{bytes, bin} = decode(:Bytes, bin) | |
{%Auth.ExportedAuthorization{id: id, bytes: bytes}, bin} | |
end | |
def decode(<<12, 91, 188, 184, bin::binary>>) do | |
{peer, bin} = decode(bin) | |
{%InputNotifyPeer{peer: peer}, bin} | |
end | |
def decode(<<23, 68, 59, 25, bin::binary>>), do: {%InputNotifyUsers{}, bin} | |
def decode(<<78, 232, 149, 74, bin::binary>>), do: {%InputNotifyChats{}, bin} | |
def decode(<<134, 184, 41, 164, bin::binary>>), do: {%InputNotifyAll{}, bin} | |
def decode(<<216, 100, 48, 240, bin::binary>>), do: {%InputPeerNotifyEventsEmpty{}, bin} | |
def decode(<<116, 44, 106, 232, bin::binary>>), do: {%InputPeerNotifyEventsAll{}, bin} | |
def decode(<<178, 94, 147, 56, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{show_previews, bin} = decode(:True, bin, flags, 1) # 0 | |
{silent, bin} = decode(:True, bin, flags, 2) # 1 | |
{mute_until, bin} = decode(:Int, bin) | |
{sound, bin} = decode(:String, bin) | |
{%InputPeerNotifySettings{flags: flags, show_previews: show_previews, silent: silent, mute_until: mute_until, sound: sound}, bin} | |
end | |
def decode(<<179, 60, 213, 173, bin::binary>>), do: {%PeerNotifyEventsEmpty{}, bin} | |
def decode(<<136, 237, 29, 109, bin::binary>>), do: {%PeerNotifyEventsAll{}, bin} | |
def decode(<<18, 133, 166, 112, bin::binary>>), do: {%PeerNotifySettingsEmpty{}, bin} | |
def decode(<<192, 164, 205, 154, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{show_previews, bin} = decode(:True, bin, flags, 1) # 0 | |
{silent, bin} = decode(:True, bin, flags, 2) # 1 | |
{mute_until, bin} = decode(:Int, bin) | |
{sound, bin} = decode(:String, bin) | |
{%PeerNotifySettings{flags: flags, show_previews: show_previews, silent: silent, mute_until: mute_until, sound: sound}, bin} | |
end | |
def decode(<<205, 38, 132, 129, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{report_spam, bin} = decode(:True, bin, flags, 1) # 0 | |
{%PeerSettings{flags: flags, report_spam: report_spam}, bin} | |
end | |
def decode(<<87, 54, 176, 204, bin::binary>>) do | |
{id, bin} = decode(:Int, bin) | |
{title, bin} = decode(:String, bin) | |
{sizes, bin} = decode([:PhotoSize], bin) | |
{color, bin} = decode(:Int, bin) | |
{%WallPaper{id: id, title: title, sizes: sizes, color: color}, bin} | |
end | |
def decode(<<36, 127, 17, 99, bin::binary>>) do | |
{id, bin} = decode(:Int, bin) | |
{title, bin} = decode(:String, bin) | |
{bg_color, bin} = decode(:Int, bin) | |
{color, bin} = decode(:Int, bin) | |
{%WallPaperSolid{id: id, title: title, bg_color: bg_color, color: color}, bin} | |
end | |
def decode(<<184, 202, 219, 88, bin::binary>>), do: {%InputReportReasonSpam{}, bin} | |
def decode(<<141, 199, 34, 30, bin::binary>>), do: {%InputReportReasonViolence{}, bin} | |
def decode(<<34, 217, 89, 46, bin::binary>>), do: {%InputReportReasonPornography{}, bin} | |
def decode(<<10, 109, 116, 225, bin::binary>>) do | |
{text, bin} = decode(:String, bin) | |
{%InputReportReasonOther{text: text}, bin} | |
end | |
def decode(<<63, 15, 34, 15, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{blocked, bin} = decode(:True, bin, flags, 1) # 0 | |
{phone_calls_available, bin} = decode(:True, bin, flags, 16) # 4 | |
{user, bin} = decode(bin) | |
{about, bin} = decode(:String, bin, flags, 2) # 1 | |
{link, bin} = decode(bin) | |
{profile_photo, bin} = decode(bin, flags, 4) # 2 | |
{notify_settings, bin} = decode(bin) | |
{bot_info, bin} = decode(bin, flags, 8) # 3 | |
{common_chats_count, bin} = decode(:Int, bin) | |
{%UserFull{flags: flags, blocked: blocked, phone_calls_available: phone_calls_available, user: user, about: about, link: link, profile_photo: profile_photo, notify_settings: notify_settings, bot_info: bot_info, common_chats_count: common_chats_count}, bin} | |
end | |
def decode(<<148, 201, 17, 249, bin::binary>>) do | |
{user_id, bin} = decode(:Int, bin) | |
{mutual, bin} = decode(bin) | |
{%Contact{user_id: user_id, mutual: mutual}, bin} | |
end | |
def decode(<<56, 132, 2, 208, bin::binary>>) do | |
{user_id, bin} = decode(:Int, bin) | |
{client_id, bin} = decode(:Long, bin) | |
{%ImportedContact{user_id: user_id, client_id: client_id}, bin} | |
end | |
def decode(<<121, 200, 27, 86, bin::binary>>) do | |
{user_id, bin} = decode(:Int, bin) | |
{date, bin} = decode(:Int, bin) | |
{%ContactBlocked{user_id: user_id, date: date}, bin} | |
end | |
def decode(<<97, 12, 104, 211, bin::binary>>) do | |
{user_id, bin} = decode(:Int, bin) | |
{status, bin} = decode(bin) | |
{%ContactStatus{user_id: user_id, status: status}, bin} | |
end | |
def decode(<<76, 72, 206, 58, bin::binary>>) do | |
{my_link, bin} = decode(bin) | |
{foreign_link, bin} = decode(bin) | |
{user, bin} = decode(bin) | |
{%Contacts.Link{my_link: my_link, foreign_link: foreign_link, user: user}, bin} | |
end | |
def decode(<<210, 169, 75, 183, bin::binary>>), do: {%Contacts.ContactsNotModified{}, bin} | |
def decode(<<178, 140, 139, 111, bin::binary>>) do | |
{contacts, bin} = decode([:Contact], bin) | |
{users, bin} = decode([:User], bin) | |
{%Contacts.Contacts{contacts: contacts, users: users}, bin} | |
end | |
def decode(<<21, 67, 82, 173, bin::binary>>) do | |
{imported, bin} = decode([:ImportedContact], bin) | |
{retry_contacts, bin} = decode([:Long], bin) | |
{users, bin} = decode([:User], bin) | |
{%Contacts.ImportedContacts{imported: imported, retry_contacts: retry_contacts, users: users}, bin} | |
end | |
def decode(<<21, 141, 19, 28, bin::binary>>) do | |
{blocked, bin} = decode([:ContactBlocked], bin) | |
{users, bin} = decode([:User], bin) | |
{%Contacts.Blocked{blocked: blocked, users: users}, bin} | |
end | |
def decode(<<161, 2, 8, 144, bin::binary>>) do | |
{count, bin} = decode(:Int, bin) | |
{blocked, bin} = decode([:ContactBlocked], bin) | |
{users, bin} = decode([:User], bin) | |
{%Contacts.BlockedSlice{count: count, blocked: blocked, users: users}, bin} | |
end | |
def decode(<<64, 108, 186, 21, bin::binary>>) do | |
{dialogs, bin} = decode([:Dialog], bin) | |
{messages, bin} = decode([:Message], bin) | |
{chats, bin} = decode([:Chat], bin) | |
{users, bin} = decode([:User], bin) | |
{%Messages.Dialogs{dialogs: dialogs, messages: messages, chats: chats, users: users}, bin} | |
end | |
def decode(<<243, 148, 224, 113, bin::binary>>) do | |
{count, bin} = decode(:Int, bin) | |
{dialogs, bin} = decode([:Dialog], bin) | |
{messages, bin} = decode([:Message], bin) | |
{chats, bin} = decode([:Chat], bin) | |
{users, bin} = decode([:User], bin) | |
{%Messages.DialogsSlice{count: count, dialogs: dialogs, messages: messages, chats: chats, users: users}, bin} | |
end | |
def decode(<<135, 142, 113, 140, bin::binary>>) do | |
{messages, bin} = decode([:Message], bin) | |
{chats, bin} = decode([:Chat], bin) | |
{users, bin} = decode([:User], bin) | |
{%Messages.Messages{messages: messages, chats: chats, users: users}, bin} | |
end | |
def decode(<<227, 106, 68, 11, bin::binary>>) do | |
{count, bin} = decode(:Int, bin) | |
{messages, bin} = decode([:Message], bin) | |
{chats, bin} = decode([:Chat], bin) | |
{users, bin} = decode([:User], bin) | |
{%Messages.MessagesSlice{count: count, messages: messages, chats: chats, users: users}, bin} | |
end | |
def decode(<<55, 46, 38, 153, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{pts, bin} = decode(:Int, bin) | |
{count, bin} = decode(:Int, bin) | |
{messages, bin} = decode([:Message], bin) | |
{chats, bin} = decode([:Chat], bin) | |
{users, bin} = decode([:User], bin) | |
{%Messages.ChannelMessages{flags: flags, pts: pts, count: count, messages: messages, chats: chats, users: users}, bin} | |
end | |
def decode(<<213, 159, 255, 100, bin::binary>>) do | |
{chats, bin} = decode([:Chat], bin) | |
{%Messages.Chats{chats: chats}, bin} | |
end | |
def decode(<<68, 17, 216, 156, bin::binary>>) do | |
{count, bin} = decode(:Int, bin) | |
{chats, bin} = decode([:Chat], bin) | |
{%Messages.ChatsSlice{count: count, chats: chats}, bin} | |
end | |
def decode(<<156, 209, 215, 229, bin::binary>>) do | |
{full_chat, bin} = decode(bin) | |
{chats, bin} = decode([:Chat], bin) | |
{users, bin} = decode([:User], bin) | |
{%Messages.ChatFull{full_chat: full_chat, chats: chats, users: users}, bin} | |
end | |
def decode(<<209, 105, 92, 180, bin::binary>>) do | |
{pts, bin} = decode(:Int, bin) | |
{pts_count, bin} = decode(:Int, bin) | |
{offset, bin} = decode(:Int, bin) | |
{%Messages.AffectedHistory{pts: pts, pts_count: pts_count, offset: offset}, bin} | |
end | |
def decode(<<108, 246, 226, 87, bin::binary>>), do: {%InputMessagesFilterEmpty{}, bin} | |
def decode(<<28, 165, 9, 150, bin::binary>>), do: {%InputMessagesFilterPhotos{}, bin} | |
def decode(<<101, 14, 192, 159, bin::binary>>), do: {%InputMessagesFilterVideo{}, bin} | |
def decode(<<228, 240, 233, 86, bin::binary>>), do: {%InputMessagesFilterPhotoVideo{}, bin} | |
def decode(<<187, 115, 94, 217, bin::binary>>), do: {%InputMessagesFilterPhotoVideoDocuments{}, bin} | |
def decode(<<136, 241, 221, 158, bin::binary>>), do: {%InputMessagesFilterDocument{}, bin} | |
def decode(<<135, 221, 240, 126, bin::binary>>), do: {%InputMessagesFilterUrl{}, bin} | |
def decode(<<135, 101, 200, 255, bin::binary>>), do: {%InputMessagesFilterGif{}, bin} | |
def decode(<<146, 195, 245, 80, bin::binary>>), do: {%InputMessagesFilterVoice{}, bin} | |
def decode(<<158, 180, 81, 55, bin::binary>>), do: {%InputMessagesFilterMusic{}, bin} | |
def decode(<<184, 236, 32, 58, bin::binary>>), do: {%InputMessagesFilterChatPhotos{}, bin} | |
def decode(<<104, 151, 201, 128, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{missed, bin} = decode(:True, bin, flags, 1) # 0 | |
{%InputMessagesFilterPhoneCalls{flags: flags, missed: missed}, bin} | |
end | |
def decode(<<253, 10, 43, 31, bin::binary>>) do | |
{message, bin} = decode(bin) | |
{pts, bin} = decode(:Int, bin) | |
{pts_count, bin} = decode(:Int, bin) | |
{%UpdateNewMessage{message: message, pts: pts, pts_count: pts_count}, bin} | |
end | |
def decode(<<214, 191, 144, 78, bin::binary>>) do | |
{id, bin} = decode(:Int, bin) | |
{random_id, bin} = decode(:Long, bin) | |
{%UpdateMessageID{id: id, random_id: random_id}, bin} | |
end | |
def decode(<<229, 176, 13, 162, bin::binary>>) do | |
{messages, bin} = decode([:Int], bin) | |
{pts, bin} = decode(:Int, bin) | |
{pts_count, bin} = decode(:Int, bin) | |
{%UpdateDeleteMessages{messages: messages, pts: pts, pts_count: pts_count}, bin} | |
end | |
def decode(<<39, 105, 72, 92, bin::binary>>) do | |
{user_id, bin} = decode(:Int, bin) | |
{action, bin} = decode(bin) | |
{%UpdateUserTyping{user_id: user_id, action: action}, bin} | |
end | |
def decode(<<31, 234, 101, 154, bin::binary>>) do | |
{chat_id, bin} = decode(:Int, bin) | |
{user_id, bin} = decode(:Int, bin) | |
{action, bin} = decode(bin) | |
{%UpdateChatUserTyping{chat_id: chat_id, user_id: user_id, action: action}, bin} | |
end | |
def decode(<<152, 17, 118, 7, bin::binary>>) do | |
{participants, bin} = decode(bin) | |
{%UpdateChatParticipants{participants: participants}, bin} | |
end | |
def decode(<<35, 216, 251, 27, bin::binary>>) do | |
{user_id, bin} = decode(:Int, bin) | |
{status, bin} = decode(bin) | |
{%UpdateUserStatus{user_id: user_id, status: status}, bin} | |
end | |
def decode(<<115, 43, 51, 167, bin::binary>>) do | |
{user_id, bin} = decode(:Int, bin) | |
{first_name, bin} = decode(:String, bin) | |
{last_name, bin} = decode(:String, bin) | |
{username, bin} = decode(:String, bin) | |
{%UpdateUserName{user_id: user_id, first_name: first_name, last_name: last_name, username: username}, bin} | |
end | |
def decode(<<12, 59, 49, 149, bin::binary>>) do | |
{user_id, bin} = decode(:Int, bin) | |
{date, bin} = decode(:Int, bin) | |
{photo, bin} = decode(bin) | |
{previous, bin} = decode(bin) | |
{%UpdateUserPhoto{user_id: user_id, date: date, photo: photo, previous: previous}, bin} | |
end | |
def decode(<<185, 187, 117, 37, bin::binary>>) do | |
{user_id, bin} = decode(:Int, bin) | |
{date, bin} = decode(:Int, bin) | |
{%UpdateContactRegistered{user_id: user_id, date: date}, bin} | |
end | |
def decode(<<197, 103, 46, 157, bin::binary>>) do | |
{user_id, bin} = decode(:Int, bin) | |
{my_link, bin} = decode(bin) | |
{foreign_link, bin} = decode(bin) | |
{%UpdateContactLink{user_id: user_id, my_link: my_link, foreign_link: foreign_link}, bin} | |
end | |
def decode(<<154, 189, 188, 18, bin::binary>>) do | |
{message, bin} = decode(bin) | |
{qts, bin} = decode(:Int, bin) | |
{%UpdateNewEncryptedMessage{message: message, qts: qts}, bin} | |
end | |
def decode(<<86, 241, 16, 23, bin::binary>>) do | |
{chat_id, bin} = decode(:Int, bin) | |
{%UpdateEncryptedChatTyping{chat_id: chat_id}, bin} | |
end | |
def decode(<<141, 232, 162, 180, bin::binary>>) do | |
{chat, bin} = decode(bin) | |
{date, bin} = decode(:Int, bin) | |
{%UpdateEncryption{chat: chat, date: date}, bin} | |
end | |
def decode(<<183, 37, 254, 56, bin::binary>>) do | |
{chat_id, bin} = decode(:Int, bin) | |
{max_date, bin} = decode(:Int, bin) | |
{date, bin} = decode(:Int, bin) | |
{%UpdateEncryptedMessagesRead{chat_id: chat_id, max_date: max_date, date: date}, bin} | |
end | |
def decode(<<92, 14, 75, 234, bin::binary>>) do | |
{chat_id, bin} = decode(:Int, bin) | |
{user_id, bin} = decode(:Int, bin) | |
{inviter_id, bin} = decode(:Int, bin) | |
{date, bin} = decode(:Int, bin) | |
{version, bin} = decode(:Int, bin) | |
{%UpdateChatParticipantAdd{chat_id: chat_id, user_id: user_id, inviter_id: inviter_id, date: date, version: version}, bin} | |
end | |
def decode(<<34, 140, 95, 110, bin::binary>>) do | |
{chat_id, bin} = decode(:Int, bin) | |
{user_id, bin} = decode(:Int, bin) | |
{version, bin} = decode(:Int, bin) | |
{%UpdateChatParticipantDelete{chat_id: chat_id, user_id: user_id, version: version}, bin} | |
end | |
def decode(<<115, 152, 94, 142, bin::binary>>) do | |
{dc_options, bin} = decode([:DcOption], bin) | |
{%UpdateDcOptions{dc_options: dc_options}, bin} | |
end | |
def decode(<<26, 232, 236, 128, bin::binary>>) do | |
{user_id, bin} = decode(:Int, bin) | |
{blocked, bin} = decode(bin) | |
{%UpdateUserBlocked{user_id: user_id, blocked: blocked}, bin} | |
end | |
def decode(<<239, 104, 194, 190, bin::binary>>) do | |
{peer, bin} = decode(bin) | |
{notify_settings, bin} = decode(bin) | |
{%UpdateNotifySettings{peer: peer, notify_settings: notify_settings}, bin} | |
end | |
def decode(<<25, 104, 228, 235, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{popup, bin} = decode(:True, bin, flags, 1) # 0 | |
{inbox_date, bin} = decode(:Int, bin, flags, 2) # 1 | |
{type, bin} = decode(:String, bin) | |
{message, bin} = decode(:String, bin) | |
{media, bin} = decode(bin) | |
{entities, bin} = decode([:MessageEntity], bin) | |
{%UpdateServiceNotification{flags: flags, popup: popup, inbox_date: inbox_date, type: type, message: message, media: media, entities: entities}, bin} | |
end | |
def decode(<<42, 39, 59, 238, bin::binary>>) do | |
{key, bin} = decode(bin) | |
{rules, bin} = decode([:PrivacyRule], bin) | |
{%UpdatePrivacy{key: key, rules: rules}, bin} | |
end | |
def decode(<<123, 65, 185, 18, bin::binary>>) do | |
{user_id, bin} = decode(:Int, bin) | |
{phone, bin} = decode(:String, bin) | |
{%UpdateUserPhone{user_id: user_id, phone: phone}, bin} | |
end | |
def decode(<<92, 253, 97, 153, bin::binary>>) do | |
{peer, bin} = decode(bin) | |
{max_id, bin} = decode(:Int, bin) | |
{pts, bin} = decode(:Int, bin) | |
{pts_count, bin} = decode(:Int, bin) | |
{%UpdateReadHistoryInbox{peer: peer, max_id: max_id, pts: pts, pts_count: pts_count}, bin} | |
end | |
def decode(<<191, 33, 47, 47, bin::binary>>) do | |
{peer, bin} = decode(bin) | |
{max_id, bin} = decode(:Int, bin) | |
{pts, bin} = decode(:Int, bin) | |
{pts_count, bin} = decode(:Int, bin) | |
{%UpdateReadHistoryOutbox{peer: peer, max_id: max_id, pts: pts, pts_count: pts_count}, bin} | |
end | |
def decode(<<19, 18, 137, 127, bin::binary>>) do | |
{webpage, bin} = decode(bin) | |
{pts, bin} = decode(:Int, bin) | |
{pts_count, bin} = decode(:Int, bin) | |
{%UpdateWebPage{webpage: webpage, pts: pts, pts_count: pts_count}, bin} | |
end | |
def decode(<<51, 57, 193, 104, bin::binary>>) do | |
{messages, bin} = decode([:Int], bin) | |
{pts, bin} = decode(:Int, bin) | |
{pts_count, bin} = decode(:Int, bin) | |
{%UpdateReadMessagesContents{messages: messages, pts: pts, pts_count: pts_count}, bin} | |
end | |
def decode(<<251, 103, 4, 235, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{channel_id, bin} = decode(:Int, bin) | |
{pts, bin} = decode(:Int, bin, flags, 1) # 0 | |
{%UpdateChannelTooLong{flags: flags, channel_id: channel_id, pts: pts}, bin} | |
end | |
def decode(<<86, 86, 212, 182, bin::binary>>) do | |
{channel_id, bin} = decode(:Int, bin) | |
{%UpdateChannel{channel_id: channel_id}, bin} | |
end | |
def decode(<<217, 4, 186, 98, bin::binary>>) do | |
{message, bin} = decode(bin) | |
{pts, bin} = decode(:Int, bin) | |
{pts_count, bin} = decode(:Int, bin) | |
{%UpdateNewChannelMessage{message: message, pts: pts, pts_count: pts_count}, bin} | |
end | |
def decode(<<127, 243, 20, 66, bin::binary>>) do | |
{channel_id, bin} = decode(:Int, bin) | |
{max_id, bin} = decode(:Int, bin) | |
{%UpdateReadChannelInbox{channel_id: channel_id, max_id: max_id}, bin} | |
end | |
def decode(<<201, 33, 117, 195, bin::binary>>) do | |
{channel_id, bin} = decode(:Int, bin) | |
{messages, bin} = decode([:Int], bin) | |
{pts, bin} = decode(:Int, bin) | |
{pts_count, bin} = decode(:Int, bin) | |
{%UpdateDeleteChannelMessages{channel_id: channel_id, messages: messages, pts: pts, pts_count: pts_count}, bin} | |
end | |
def decode(<<75, 43, 161, 152, bin::binary>>) do | |
{channel_id, bin} = decode(:Int, bin) | |
{id, bin} = decode(:Int, bin) | |
{views, bin} = decode(:Int, bin) | |
{%UpdateChannelMessageViews{channel_id: channel_id, id: id, views: views}, bin} | |
end | |
def decode(<<65, 121, 148, 110, bin::binary>>) do | |
{chat_id, bin} = decode(:Int, bin) | |
{enabled, bin} = decode(bin) | |
{version, bin} = decode(:Int, bin) | |
{%UpdateChatAdmins{chat_id: chat_id, enabled: enabled, version: version}, bin} | |
end | |
def decode(<<89, 25, 144, 182, bin::binary>>) do | |
{chat_id, bin} = decode(:Int, bin) | |
{user_id, bin} = decode(:Int, bin) | |
{is_admin, bin} = decode(bin) | |
{version, bin} = decode(:Int, bin) | |
{%UpdateChatParticipantAdmin{chat_id: chat_id, user_id: user_id, is_admin: is_admin, version: version}, bin} | |
end | |
def decode(<<170, 48, 138, 104, bin::binary>>) do | |
{stickerset, bin} = decode(bin) | |
{%UpdateNewStickerSet{stickerset: stickerset}, bin} | |
end | |
def decode(<<1, 210, 178, 11, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{masks, bin} = decode(:True, bin, flags, 1) # 0 | |
{order, bin} = decode([:Long], bin) | |
{%UpdateStickerSetsOrder{flags: flags, masks: masks, order: order}, bin} | |
end | |
def decode(<<236, 61, 174, 67, bin::binary>>), do: {%UpdateStickerSets{}, bin} | |
def decode(<<30, 52, 117, 147, bin::binary>>), do: {%UpdateSavedGifs{}, bin} | |
def decode(<<144, 102, 130, 84, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{query_id, bin} = decode(:Long, bin) | |
{user_id, bin} = decode(:Int, bin) | |
{query, bin} = decode(:String, bin) | |
{geo, bin} = decode(bin, flags, 1) # 0 | |
{offset, bin} = decode(:String, bin) | |
{%UpdateBotInlineQuery{flags: flags, query_id: query_id, user_id: user_id, query: query, geo: geo, offset: offset}, bin} | |
end | |
def decode(<<100, 249, 72, 14, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{user_id, bin} = decode(:Int, bin) | |
{query, bin} = decode(:String, bin) | |
{geo, bin} = decode(bin, flags, 1) # 0 | |
{id, bin} = decode(:String, bin) | |
{msg_id, bin} = decode(bin, flags, 2) # 1 | |
{%UpdateBotInlineSend{flags: flags, user_id: user_id, query: query, geo: geo, id: id, msg_id: msg_id}, bin} | |
end | |
def decode(<<247, 77, 63, 27, bin::binary>>) do | |
{message, bin} = decode(bin) | |
{pts, bin} = decode(:Int, bin) | |
{pts_count, bin} = decode(:Int, bin) | |
{%UpdateEditChannelMessage{message: message, pts: pts, pts_count: pts_count}, bin} | |
end | |
def decode(<<117, 36, 89, 152, bin::binary>>) do | |
{channel_id, bin} = decode(:Int, bin) | |
{id, bin} = decode(:Int, bin) | |
{%UpdateChannelPinnedMessage{channel_id: channel_id, id: id}, bin} | |
end | |
def decode(<<225, 71, 53, 231, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{query_id, bin} = decode(:Long, bin) | |
{user_id, bin} = decode(:Int, bin) | |
{peer, bin} = decode(bin) | |
{msg_id, bin} = decode(:Int, bin) | |
{chat_instance, bin} = decode(:Long, bin) | |
{data, bin} = decode(:Bytes, bin, flags, 1) # 0 | |
{game_short_name, bin} = decode(:String, bin, flags, 2) # 1 | |
{%UpdateBotCallbackQuery{flags: flags, query_id: query_id, user_id: user_id, peer: peer, msg_id: msg_id, chat_instance: chat_instance, data: data, game_short_name: game_short_name}, bin} | |
end | |
def decode(<<163, 112, 3, 228, bin::binary>>) do | |
{message, bin} = decode(bin) | |
{pts, bin} = decode(:Int, bin) | |
{pts_count, bin} = decode(:Int, bin) | |
{%UpdateEditMessage{message: message, pts: pts, pts_count: pts_count}, bin} | |
end | |
def decode(<<90, 122, 210, 249, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{query_id, bin} = decode(:Long, bin) | |
{user_id, bin} = decode(:Int, bin) | |
{msg_id, bin} = decode(bin) | |
{chat_instance, bin} = decode(:Long, bin) | |
{data, bin} = decode(:Bytes, bin, flags, 1) # 0 | |
{game_short_name, bin} = decode(:String, bin, flags, 2) # 1 | |
{%UpdateInlineBotCallbackQuery{flags: flags, query_id: query_id, user_id: user_id, msg_id: msg_id, chat_instance: chat_instance, data: data, game_short_name: game_short_name}, bin} | |
end | |
def decode(<<199, 201, 214, 37, bin::binary>>) do | |
{channel_id, bin} = decode(:Int, bin) | |
{max_id, bin} = decode(:Int, bin) | |
{%UpdateReadChannelOutbox{channel_id: channel_id, max_id: max_id}, bin} | |
end | |
def decode(<<105, 185, 43, 238, bin::binary>>) do | |
{peer, bin} = decode(bin) | |
{draft, bin} = decode(bin) | |
{%UpdateDraftMessage{peer: peer, draft: draft}, bin} | |
end | |
def decode(<<66, 39, 29, 87, bin::binary>>), do: {%UpdateReadFeaturedStickers{}, bin} | |
def decode(<<32, 44, 66, 154, bin::binary>>), do: {%UpdateRecentStickers{}, bin} | |
def decode(<<6, 221, 41, 162, bin::binary>>), do: {%UpdateConfig{}, bin} | |
def decode(<<143, 103, 84, 51, bin::binary>>), do: {%UpdatePtsChanged{}, bin} | |
def decode(<<0, 25, 119, 64, bin::binary>>) do | |
{channel_id, bin} = decode(:Int, bin) | |
{webpage, bin} = decode(bin) | |
{pts, bin} = decode(:Int, bin) | |
{pts_count, bin} = decode(:Int, bin) | |
{%UpdateChannelWebPage{channel_id: channel_id, webpage: webpage, pts: pts, pts_count: pts_count}, bin} | |
end | |
def decode(<<30, 107, 15, 171, bin::binary>>) do | |
{phone_call, bin} = decode(bin) | |
{%UpdatePhoneCall{phone_call: phone_call}, bin} | |
end | |
def decode(<<204, 162, 17, 215, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{pinned, bin} = decode(:True, bin, flags, 1) # 0 | |
{peer, bin} = decode(bin) | |
{%UpdateDialogPinned{flags: flags, pinned: pinned, peer: peer}, bin} | |
end | |
def decode(<<141, 246, 202, 216, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{order, bin} = decode([:Peer], bin, flags, 1) # 0 | |
{%UpdatePinnedDialogs{flags: flags, order: order}, bin} | |
end | |
def decode(<<62, 42, 108, 165, bin::binary>>) do | |
{pts, bin} = decode(:Int, bin) | |
{qts, bin} = decode(:Int, bin) | |
{date, bin} = decode(:Int, bin) | |
{seq, bin} = decode(:Int, bin) | |
{unread_count, bin} = decode(:Int, bin) | |
{%Updates.State{pts: pts, qts: qts, date: date, seq: seq, unread_count: unread_count}, bin} | |
end | |
def decode(<<56, 161, 117, 93, bin::binary>>) do | |
{date, bin} = decode(:Int, bin) | |
{seq, bin} = decode(:Int, bin) | |
{%Updates.DifferenceEmpty{date: date, seq: seq}, bin} | |
end | |
def decode(<<160, 156, 244, 0, bin::binary>>) do | |
{new_messages, bin} = decode([:Message], bin) | |
{new_encrypted_messages, bin} = decode([:EncryptedMessage], bin) | |
{other_updates, bin} = decode([:Update], bin) | |
{chats, bin} = decode([:Chat], bin) | |
{users, bin} = decode([:User], bin) | |
{state, bin} = decode(bin) | |
{%Updates.Difference{new_messages: new_messages, new_encrypted_messages: new_encrypted_messages, other_updates: other_updates, chats: chats, users: users, state: state}, bin} | |
end | |
def decode(<<129, 25, 251, 168, bin::binary>>) do | |
{new_messages, bin} = decode([:Message], bin) | |
{new_encrypted_messages, bin} = decode([:EncryptedMessage], bin) | |
{other_updates, bin} = decode([:Update], bin) | |
{chats, bin} = decode([:Chat], bin) | |
{users, bin} = decode([:User], bin) | |
{intermediate_state, bin} = decode(bin) | |
{%Updates.DifferenceSlice{new_messages: new_messages, new_encrypted_messages: new_encrypted_messages, other_updates: other_updates, chats: chats, users: users, intermediate_state: intermediate_state}, bin} | |
end | |
def decode(<<109, 143, 254, 74, bin::binary>>) do | |
{pts, bin} = decode(:Int, bin) | |
{%Updates.DifferenceTooLong{pts: pts}, bin} | |
end | |
def decode(<<126, 175, 23, 227, bin::binary>>), do: {%UpdatesTooLong{}, bin} | |
def decode(<<17, 191, 79, 145, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{out, bin} = decode(:True, bin, flags, 2) # 1 | |
{mentioned, bin} = decode(:True, bin, flags, 16) # 4 | |
{media_unread, bin} = decode(:True, bin, flags, 32) # 5 | |
{silent, bin} = decode(:True, bin, flags, 8192) # 13 | |
{id, bin} = decode(:Int, bin) | |
{user_id, bin} = decode(:Int, bin) | |
{message, bin} = decode(:String, bin) | |
{pts, bin} = decode(:Int, bin) | |
{pts_count, bin} = decode(:Int, bin) | |
{date, bin} = decode(:Int, bin) | |
{fwd_from, bin} = decode(bin, flags, 4) # 2 | |
{via_bot_id, bin} = decode(:Int, bin, flags, 2048) # 11 | |
{reply_to_msg_id, bin} = decode(:Int, bin, flags, 8) # 3 | |
{entities, bin} = decode([:MessageEntity], bin, flags, 128) # 7 | |
{%UpdateShortMessage{flags: flags, out: out, mentioned: mentioned, media_unread: media_unread, silent: silent, id: id, user_id: user_id, message: message, pts: pts, pts_count: pts_count, date: date, fwd_from: fwd_from, via_bot_id: via_bot_id, reply_to_msg_id: reply_to_msg_id, entities: entities}, bin} | |
end | |
def decode(<<136, 38, 129, 22, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{out, bin} = decode(:True, bin, flags, 2) # 1 | |
{mentioned, bin} = decode(:True, bin, flags, 16) # 4 | |
{media_unread, bin} = decode(:True, bin, flags, 32) # 5 | |
{silent, bin} = decode(:True, bin, flags, 8192) # 13 | |
{id, bin} = decode(:Int, bin) | |
{from_id, bin} = decode(:Int, bin) | |
{chat_id, bin} = decode(:Int, bin) | |
{message, bin} = decode(:String, bin) | |
{pts, bin} = decode(:Int, bin) | |
{pts_count, bin} = decode(:Int, bin) | |
{date, bin} = decode(:Int, bin) | |
{fwd_from, bin} = decode(bin, flags, 4) # 2 | |
{via_bot_id, bin} = decode(:Int, bin, flags, 2048) # 11 | |
{reply_to_msg_id, bin} = decode(:Int, bin, flags, 8) # 3 | |
{entities, bin} = decode([:MessageEntity], bin, flags, 128) # 7 | |
{%UpdateShortChatMessage{flags: flags, out: out, mentioned: mentioned, media_unread: media_unread, silent: silent, id: id, from_id: from_id, chat_id: chat_id, message: message, pts: pts, pts_count: pts_count, date: date, fwd_from: fwd_from, via_bot_id: via_bot_id, reply_to_msg_id: reply_to_msg_id, entities: entities}, bin} | |
end | |
def decode(<<193, 222, 212, 120, bin::binary>>) do | |
{update, bin} = decode(bin) | |
{date, bin} = decode(:Int, bin) | |
{%UpdateShort{update: update, date: date}, bin} | |
end | |
def decode(<<195, 4, 91, 114, bin::binary>>) do | |
{updates, bin} = decode([:Update], bin) | |
{users, bin} = decode([:User], bin) | |
{chats, bin} = decode([:Chat], bin) | |
{date, bin} = decode(:Int, bin) | |
{seq_start, bin} = decode(:Int, bin) | |
{seq, bin} = decode(:Int, bin) | |
{%UpdatesCombined{updates: updates, users: users, chats: chats, date: date, seq_start: seq_start, seq: seq}, bin} | |
end | |
def decode(<<64, 66, 174, 116, bin::binary>>) do | |
{updates, bin} = decode([:Update], bin) | |
{users, bin} = decode([:User], bin) | |
{chats, bin} = decode([:Chat], bin) | |
{date, bin} = decode(:Int, bin) | |
{seq, bin} = decode(:Int, bin) | |
{%Updates{updates: updates, users: users, chats: chats, date: date, seq: seq}, bin} | |
end | |
def decode(<<28, 51, 241, 17, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{out, bin} = decode(:True, bin, flags, 2) # 1 | |
{id, bin} = decode(:Int, bin) | |
{pts, bin} = decode(:Int, bin) | |
{pts_count, bin} = decode(:Int, bin) | |
{date, bin} = decode(:Int, bin) | |
{media, bin} = decode(bin, flags, 512) # 9 | |
{entities, bin} = decode([:MessageEntity], bin, flags, 128) # 7 | |
{%UpdateShortSentMessage{flags: flags, out: out, id: id, pts: pts, pts_count: pts_count, date: date, media: media, entities: entities}, bin} | |
end | |
def decode(<<165, 106, 202, 141, bin::binary>>) do | |
{photos, bin} = decode([:Photo], bin) | |
{users, bin} = decode([:User], bin) | |
{%Photos.Photos{photos: photos, users: users}, bin} | |
end | |
def decode(<<84, 31, 5, 21, bin::binary>>) do | |
{count, bin} = decode(:Int, bin) | |
{photos, bin} = decode([:Photo], bin) | |
{users, bin} = decode([:User], bin) | |
{%Photos.PhotosSlice{count: count, photos: photos, users: users}, bin} | |
end | |
def decode(<<168, 44, 33, 32, bin::binary>>) do | |
{photo, bin} = decode(bin) | |
{users, bin} = decode([:User], bin) | |
{%Photos.Photo{photo: photo, users: users}, bin} | |
end | |
def decode(<<213, 24, 106, 9, bin::binary>>) do | |
{type, bin} = decode(bin) | |
{mtime, bin} = decode(:Int, bin) | |
{bytes, bin} = decode(:Bytes, bin) | |
{%Upload.File{type: type, mtime: mtime, bytes: bytes}, bin} | |
end | |
def decode(<<204, 198, 216, 5, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{ipv6, bin} = decode(:True, bin, flags, 1) # 0 | |
{media_only, bin} = decode(:True, bin, flags, 2) # 1 | |
{tcpo_only, bin} = decode(:True, bin, flags, 4) # 2 | |
{id, bin} = decode(:Int, bin) | |
{ip_address, bin} = decode(:String, bin) | |
{port, bin} = decode(:Int, bin) | |
{%DcOption{flags: flags, ipv6: ipv6, media_only: media_only, tcpo_only: tcpo_only, id: id, ip_address: ip_address, port: port}, bin} | |
end | |
def decode(<<95, 251, 246, 58, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{phonecalls_enabled, bin} = decode(:True, bin, flags, 2) # 1 | |
{date, bin} = decode(:Int, bin) | |
{expires, bin} = decode(:Int, bin) | |
{test_mode, bin} = decode(bin) | |
{this_dc, bin} = decode(:Int, bin) | |
{dc_options, bin} = decode([:DcOption], bin) | |
{chat_size_max, bin} = decode(:Int, bin) | |
{megagroup_size_max, bin} = decode(:Int, bin) | |
{forwarded_count_max, bin} = decode(:Int, bin) | |
{online_update_period_ms, bin} = decode(:Int, bin) | |
{offline_blur_timeout_ms, bin} = decode(:Int, bin) | |
{offline_idle_timeout_ms, bin} = decode(:Int, bin) | |
{online_cloud_timeout_ms, bin} = decode(:Int, bin) | |
{notify_cloud_delay_ms, bin} = decode(:Int, bin) | |
{notify_default_delay_ms, bin} = decode(:Int, bin) | |
{chat_big_size, bin} = decode(:Int, bin) | |
{push_chat_period_ms, bin} = decode(:Int, bin) | |
{push_chat_limit, bin} = decode(:Int, bin) | |
{saved_gifs_limit, bin} = decode(:Int, bin) | |
{edit_time_limit, bin} = decode(:Int, bin) | |
{rating_e_decay, bin} = decode(:Int, bin) | |
{stickers_recent_limit, bin} = decode(:Int, bin) | |
{tmp_sessions, bin} = decode(:Int, bin, flags, 1) # 0 | |
{pinned_dialogs_count_max, bin} = decode(:Int, bin) | |
{call_receive_timeout_ms, bin} = decode(:Int, bin) | |
{call_ring_timeout_ms, bin} = decode(:Int, bin) | |
{call_connect_timeout_ms, bin} = decode(:Int, bin) | |
{call_packet_timeout_ms, bin} = decode(:Int, bin) | |
{disabled_features, bin} = decode([:DisabledFeature], bin) | |
{%Config{flags: flags, phonecalls_enabled: phonecalls_enabled, date: date, expires: expires, test_mode: test_mode, this_dc: this_dc, dc_options: dc_options, chat_size_max: chat_size_max, megagroup_size_max: megagroup_size_max, forwarded_count_max: forwarded_count_max, online_update_period_ms: online_update_period_ms, offline_blur_timeout_ms: offline_blur_timeout_ms, offline_idle_timeout_ms: offline_idle_timeout_ms, online_cloud_timeout_ms: online_cloud_timeout_ms, notify_cloud_delay_ms: notify_cloud_delay_ms, notify_default_delay_ms: notify_default_delay_ms, chat_big_size: chat_big_size, push_chat_period_ms: push_chat_period_ms, push_chat_limit: push_chat_limit, saved_gifs_limit: saved_gifs_limit, edit_time_limit: edit_time_limit, rating_e_decay: rating_e_decay, stickers_recent_limit: stickers_recent_limit, tmp_sessions: tmp_sessions, pinned_dialogs_count_max: pinned_dialogs_count_max, call_receive_timeout_ms: call_receive_timeout_ms, call_ring_timeout_ms: call_ring_timeout_ms, call_connect_timeout_ms: call_connect_timeout_ms, call_packet_timeout_ms: call_packet_timeout_ms, disabled_features: disabled_features}, bin} | |
end | |
def decode(<<117, 23, 26, 142, bin::binary>>) do | |
{country, bin} = decode(:String, bin) | |
{this_dc, bin} = decode(:Int, bin) | |
{nearest_dc, bin} = decode(:Int, bin) | |
{%NearestDc{country: country, this_dc: this_dc, nearest_dc: nearest_dc}, bin} | |
end | |
def decode(<<17, 243, 135, 137, bin::binary>>) do | |
{id, bin} = decode(:Int, bin) | |
{critical, bin} = decode(bin) | |
{url, bin} = decode(:String, bin) | |
{text, bin} = decode(:String, bin) | |
{%Help.AppUpdate{id: id, critical: critical, url: url, text: text}, bin} | |
end | |
def decode(<<54, 101, 90, 196, bin::binary>>), do: {%Help.NoAppUpdate{}, bin} | |
def decode(<<120, 159, 203, 24, bin::binary>>) do | |
{message, bin} = decode(:String, bin) | |
{%Help.InviteText{message: message}, bin} | |
end | |
def decode(<<160, 192, 126, 171, bin::binary>>) do | |
{id, bin} = decode(:Int, bin) | |
{%EncryptedChatEmpty{id: id}, bin} | |
end | |
def decode(<<220, 3, 247, 59, bin::binary>>) do | |
{id, bin} = decode(:Int, bin) | |
{access_hash, bin} = decode(:Long, bin) | |
{date, bin} = decode(:Int, bin) | |
{admin_id, bin} = decode(:Int, bin) | |
{participant_id, bin} = decode(:Int, bin) | |
{%EncryptedChatWaiting{id: id, access_hash: access_hash, date: date, admin_id: admin_id, participant_id: participant_id}, bin} | |
end | |
def decode(<<126, 82, 120, 200, bin::binary>>) do | |
{id, bin} = decode(:Int, bin) | |
{access_hash, bin} = decode(:Long, bin) | |
{date, bin} = decode(:Int, bin) | |
{admin_id, bin} = decode(:Int, bin) | |
{participant_id, bin} = decode(:Int, bin) | |
{g_a, bin} = decode(:Bytes, bin) | |
{%EncryptedChatRequested{id: id, access_hash: access_hash, date: date, admin_id: admin_id, participant_id: participant_id, g_a: g_a}, bin} | |
end | |
def decode(<<54, 206, 86, 250, bin::binary>>) do | |
{id, bin} = decode(:Int, bin) | |
{access_hash, bin} = decode(:Long, bin) | |
{date, bin} = decode(:Int, bin) | |
{admin_id, bin} = decode(:Int, bin) | |
{participant_id, bin} = decode(:Int, bin) | |
{g_a_or_b, bin} = decode(:Bytes, bin) | |
{key_fingerprint, bin} = decode(:Long, bin) | |
{%EncryptedChat{id: id, access_hash: access_hash, date: date, admin_id: admin_id, participant_id: participant_id, g_a_or_b: g_a_or_b, key_fingerprint: key_fingerprint}, bin} | |
end | |
def decode(<<39, 221, 214, 19, bin::binary>>) do | |
{id, bin} = decode(:Int, bin) | |
{%EncryptedChatDiscarded{id: id}, bin} | |
end | |
def decode(<<225, 181, 65, 241, bin::binary>>) do | |
{chat_id, bin} = decode(:Int, bin) | |
{access_hash, bin} = decode(:Long, bin) | |
{%InputEncryptedChat{chat_id: chat_id, access_hash: access_hash}, bin} | |
end | |
def decode(<<126, 73, 31, 194, bin::binary>>), do: {%EncryptedFileEmpty{}, bin} | |
def decode(<<76, 153, 112, 74, bin::binary>>) do | |
{id, bin} = decode(:Long, bin) | |
{access_hash, bin} = decode(:Long, bin) | |
{size, bin} = decode(:Int, bin) | |
{dc_id, bin} = decode(:Int, bin) | |
{key_fingerprint, bin} = decode(:Int, bin) | |
{%EncryptedFile{id: id, access_hash: access_hash, size: size, dc_id: dc_id, key_fingerprint: key_fingerprint}, bin} | |
end | |
def decode(<<100, 195, 55, 24, bin::binary>>), do: {%InputEncryptedFileEmpty{}, bin} | |
def decode(<<6, 3, 189, 100, bin::binary>>) do | |
{id, bin} = decode(:Long, bin) | |
{parts, bin} = decode(:Int, bin) | |
{md5_checksum, bin} = decode(:String, bin) | |
{key_fingerprint, bin} = decode(:Int, bin) | |
{%InputEncryptedFileUploaded{id: id, parts: parts, md5_checksum: md5_checksum, key_fingerprint: key_fingerprint}, bin} | |
end | |
def decode(<<229, 181, 23, 90, bin::binary>>) do | |
{id, bin} = decode(:Long, bin) | |
{access_hash, bin} = decode(:Long, bin) | |
{%InputEncryptedFile{id: id, access_hash: access_hash}, bin} | |
end | |
def decode(<<200, 115, 193, 45, bin::binary>>) do | |
{id, bin} = decode(:Long, bin) | |
{parts, bin} = decode(:Int, bin) | |
{key_fingerprint, bin} = decode(:Int, bin) | |
{%InputEncryptedFileBigUploaded{id: id, parts: parts, key_fingerprint: key_fingerprint}, bin} | |
end | |
def decode(<<24, 193, 24, 237, bin::binary>>) do | |
{random_id, bin} = decode(:Long, bin) | |
{chat_id, bin} = decode(:Int, bin) | |
{date, bin} = decode(:Int, bin) | |
{bytes, bin} = decode(:Bytes, bin) | |
{file, bin} = decode(bin) | |
{%EncryptedMessage{random_id: random_id, chat_id: chat_id, date: date, bytes: bytes, file: file}, bin} | |
end | |
def decode(<<6, 75, 115, 35, bin::binary>>) do | |
{random_id, bin} = decode(:Long, bin) | |
{chat_id, bin} = decode(:Int, bin) | |
{date, bin} = decode(:Int, bin) | |
{bytes, bin} = decode(:Bytes, bin) | |
{%EncryptedMessageService{random_id: random_id, chat_id: chat_id, date: date, bytes: bytes}, bin} | |
end | |
def decode(<<53, 70, 226, 192, bin::binary>>) do | |
{random, bin} = decode(:Bytes, bin) | |
{%Messages.DhConfigNotModified{random: random}, bin} | |
end | |
def decode(<<221, 30, 34, 44, bin::binary>>) do | |
{g, bin} = decode(:Int, bin) | |
{p, bin} = decode(:Bytes, bin) | |
{version, bin} = decode(:Int, bin) | |
{random, bin} = decode(:Bytes, bin) | |
{%Messages.DhConfig{g: g, p: p, version: version, random: random}, bin} | |
end | |
def decode(<<53, 137, 15, 86, bin::binary>>) do | |
{date, bin} = decode(:Int, bin) | |
{%Messages.SentEncryptedMessage{date: date}, bin} | |
end | |
def decode(<<50, 255, 147, 148, bin::binary>>) do | |
{date, bin} = decode(:Int, bin) | |
{file, bin} = decode(bin) | |
{%Messages.SentEncryptedFile{date: date, file: file}, bin} | |
end | |
def decode(<<174, 234, 240, 114, bin::binary>>), do: {%InputDocumentEmpty{}, bin} | |
def decode(<<82, 137, 121, 24, bin::binary>>) do | |
{id, bin} = decode(:Long, bin) | |
{access_hash, bin} = decode(:Long, bin) | |
{%InputDocument{id: id, access_hash: access_hash}, bin} | |
end | |
def decode(<<113, 200, 248, 54, bin::binary>>) do | |
{id, bin} = decode(:Long, bin) | |
{%DocumentEmpty{id: id}, bin} | |
end | |
def decode(<<199, 43, 35, 135, bin::binary>>) do | |
{id, bin} = decode(:Long, bin) | |
{access_hash, bin} = decode(:Long, bin) | |
{date, bin} = decode(:Int, bin) | |
{mime_type, bin} = decode(:String, bin) | |
{size, bin} = decode(:Int, bin) | |
{thumb, bin} = decode(bin) | |
{dc_id, bin} = decode(:Int, bin) | |
{version, bin} = decode(:Int, bin) | |
{attributes, bin} = decode([:DocumentAttribute], bin) | |
{%Document{id: id, access_hash: access_hash, date: date, mime_type: mime_type, size: size, thumb: thumb, dc_id: dc_id, version: version, attributes: attributes}, bin} | |
end | |
def decode(<<246, 181, 198, 23, bin::binary>>) do | |
{phone_number, bin} = decode(:String, bin) | |
{user, bin} = decode(bin) | |
{%Help.Support{phone_number: phone_number, user: user}, bin} | |
end | |
def decode(<<216, 11, 212, 159, bin::binary>>) do | |
{peer, bin} = decode(bin) | |
{%NotifyPeer{peer: peer}, bin} | |
end | |
def decode(<<76, 59, 200, 180, bin::binary>>), do: {%NotifyUsers{}, bin} | |
def decode(<<195, 206, 7, 192, bin::binary>>), do: {%NotifyChats{}, bin} | |
def decode(<<96, 124, 208, 116, bin::binary>>), do: {%NotifyAll{}, bin} | |
def decode(<<78, 116, 191, 22, bin::binary>>), do: {%SendMessageTypingAction{}, bin} | |
def decode(<<245, 200, 94, 253, bin::binary>>), do: {%SendMessageCancelAction{}, bin} | |
def decode(<<111, 214, 135, 161, bin::binary>>), do: {%SendMessageRecordVideoAction{}, bin} | |
def decode(<<236, 58, 118, 233, bin::binary>>) do | |
{progress, bin} = decode(:Int, bin) | |
{%SendMessageUploadVideoAction{progress: progress}, bin} | |
end | |
def decode(<<247, 115, 47, 213, bin::binary>>), do: {%SendMessageRecordAudioAction{}, bin} | |
def decode(<<171, 215, 81, 243, bin::binary>>) do | |
{progress, bin} = decode(:Int, bin) | |
{%SendMessageUploadAudioAction{progress: progress}, bin} | |
end | |
def decode(<<38, 74, 211, 209, bin::binary>>) do | |
{progress, bin} = decode(:Int, bin) | |
{%SendMessageUploadPhotoAction{progress: progress}, bin} | |
end | |
def decode(<<228, 217, 12, 170, bin::binary>>) do | |
{progress, bin} = decode(:Int, bin) | |
{%SendMessageUploadDocumentAction{progress: progress}, bin} | |
end | |
def decode(<<161, 139, 111, 23, bin::binary>>), do: {%SendMessageGeoLocationAction{}, bin} | |
def decode(<<111, 188, 140, 98, bin::binary>>), do: {%SendMessageChooseContactAction{}, bin} | |
def decode(<<72, 143, 106, 221, bin::binary>>), do: {%SendMessageGamePlayAction{}, bin} | |
def decode(<<132, 247, 161, 26, bin::binary>>) do | |
{results, bin} = decode([:Peer], bin) | |
{chats, bin} = decode([:Chat], bin) | |
{users, bin} = decode([:User], bin) | |
{%Contacts.Found{results: results, chats: chats, users: users}, bin} | |
end | |
def decode(<<24, 203, 150, 79, bin::binary>>), do: {%InputPrivacyKeyStatusTimestamp{}, bin} | |
def decode(<<38, 4, 251, 189, bin::binary>>), do: {%InputPrivacyKeyChatInvite{}, bin} | |
def decode(<<95, 220, 186, 250, bin::binary>>), do: {%InputPrivacyKeyPhoneCall{}, bin} | |
def decode(<<48, 171, 46, 188, bin::binary>>), do: {%PrivacyKeyStatusTimestamp{}, bin} | |
def decode(<<250, 109, 14, 80, bin::binary>>), do: {%PrivacyKeyChatInvite{}, bin} | |
def decode(<<123, 43, 102, 61, bin::binary>>), do: {%PrivacyKeyPhoneCall{}, bin} | |
def decode(<<123, 224, 9, 13, bin::binary>>), do: {%InputPrivacyValueAllowContacts{}, bin} | |
def decode(<<206, 53, 75, 24, bin::binary>>), do: {%InputPrivacyValueAllowAll{}, bin} | |
def decode(<<127, 198, 28, 19, bin::binary>>) do | |
{users, bin} = decode([:InputUser], bin) | |
{%InputPrivacyValueAllowUsers{users: users}, bin} | |
end | |
def decode(<<7, 32, 165, 11, bin::binary>>), do: {%InputPrivacyValueDisallowContacts{}, bin} | |
def decode(<<201, 102, 107, 214, bin::binary>>), do: {%InputPrivacyValueDisallowAll{}, bin} | |
def decode(<<103, 4, 17, 144, bin::binary>>) do | |
{users, bin} = decode([:InputUser], bin) | |
{%InputPrivacyValueDisallowUsers{users: users}, bin} | |
end | |
def decode(<<172, 27, 254, 255, bin::binary>>), do: {%PrivacyValueAllowContacts{}, bin} | |
def decode(<<130, 123, 66, 101, bin::binary>>), do: {%PrivacyValueAllowAll{}, bin} | |
def decode(<<12, 190, 91, 77, bin::binary>>) do | |
{users, bin} = decode([:Int], bin) | |
{%PrivacyValueAllowUsers{users: users}, bin} | |
end | |
def decode(<<26, 250, 136, 248, bin::binary>>), do: {%PrivacyValueDisallowContacts{}, bin} | |
def decode(<<99, 231, 115, 139, bin::binary>>), do: {%PrivacyValueDisallowAll{}, bin} | |
def decode(<<183, 73, 127, 12, bin::binary>>) do | |
{users, bin} = decode([:Int], bin) | |
{%PrivacyValueDisallowUsers{users: users}, bin} | |
end | |
def decode(<<111, 187, 74, 85, bin::binary>>) do | |
{rules, bin} = decode([:PrivacyRule], bin) | |
{users, bin} = decode([:User], bin) | |
{%Account.PrivacyRules{rules: rules, users: users}, bin} | |
end | |
def decode(<<223, 175, 208, 184, bin::binary>>) do | |
{days, bin} = decode(:Int, bin) | |
{%AccountDaysTTL{days: days}, bin} | |
end | |
def decode(<<92, 193, 55, 108, bin::binary>>) do | |
{w, bin} = decode(:Int, bin) | |
{h, bin} = decode(:Int, bin) | |
{%DocumentAttributeImageSize{w: w, h: h}, bin} | |
end | |
def decode(<<57, 137, 181, 17, bin::binary>>), do: {%DocumentAttributeAnimated{}, bin} | |
def decode(<<18, 214, 25, 99, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{mask, bin} = decode(:True, bin, flags, 2) # 1 | |
{alt, bin} = decode(:String, bin) | |
{stickerset, bin} = decode(bin) | |
{mask_coords, bin} = decode(bin, flags, 1) # 0 | |
{%DocumentAttributeSticker{flags: flags, mask: mask, alt: alt, stickerset: stickerset, mask_coords: mask_coords}, bin} | |
end | |
def decode(<<203, 204, 16, 89, bin::binary>>) do | |
{duration, bin} = decode(:Int, bin) | |
{w, bin} = decode(:Int, bin) | |
{h, bin} = decode(:Int, bin) | |
{%DocumentAttributeVideo{duration: duration, w: w, h: h}, bin} | |
end | |
def decode(<<198, 249, 82, 152, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{voice, bin} = decode(:True, bin, flags, 1024) # 10 | |
{duration, bin} = decode(:Int, bin) | |
{title, bin} = decode(:String, bin, flags, 1) # 0 | |
{performer, bin} = decode(:String, bin, flags, 2) # 1 | |
{waveform, bin} = decode(:Bytes, bin, flags, 4) # 2 | |
{%DocumentAttributeAudio{flags: flags, voice: voice, duration: duration, title: title, performer: performer, waveform: waveform}, bin} | |
end | |
def decode(<<104, 0, 89, 21, bin::binary>>) do | |
{file_name, bin} = decode(:String, bin) | |
{%DocumentAttributeFilename{file_name: file_name}, bin} | |
end | |
def decode(<<247, 210, 1, 152, bin::binary>>), do: {%DocumentAttributeHasStickers{}, bin} | |
def decode(<<34, 154, 116, 241, bin::binary>>), do: {%Messages.StickersNotModified{}, bin} | |
def decode(<<50, 205, 142, 138, bin::binary>>) do | |
{hash, bin} = decode(:String, bin) | |
{stickers, bin} = decode([:Document], bin) | |
{%Messages.Stickers{hash: hash, stickers: stickers}, bin} | |
end | |
def decode(<<212, 153, 178, 18, bin::binary>>) do | |
{emoticon, bin} = decode(:String, bin) | |
{documents, bin} = decode([:Long], bin) | |
{%StickerPack{emoticon: emoticon, documents: documents}, bin} | |
end | |
def decode(<<195, 2, 102, 232, bin::binary>>), do: {%Messages.AllStickersNotModified{}, bin} | |
def decode(<<95, 64, 253, 237, bin::binary>>) do | |
{hash, bin} = decode(:Int, bin) | |
{sets, bin} = decode([:StickerSet], bin) | |
{%Messages.AllStickers{hash: hash, sets: sets}, bin} | |
end | |
def decode(<<36, 111, 99, 174, bin::binary>>) do | |
{feature, bin} = decode(:String, bin) | |
{description, bin} = decode(:String, bin) | |
{%DisabledFeature{feature: feature, description: description}, bin} | |
end | |
def decode(<<133, 145, 209, 132, bin::binary>>) do | |
{pts, bin} = decode(:Int, bin) | |
{pts_count, bin} = decode(:Int, bin) | |
{%Messages.AffectedMessages{pts: pts, pts_count: pts_count}, bin} | |
end | |
def decode(<<71, 146, 79, 95, bin::binary>>), do: {%ContactLinkUnknown{}, bin} | |
def decode(<<173, 211, 237, 254, bin::binary>>), do: {%ContactLinkNone{}, bin} | |
def decode(<<89, 63, 143, 38, bin::binary>>), do: {%ContactLinkHasPhone{}, bin} | |
def decode(<<208, 194, 2, 213, bin::binary>>), do: {%ContactLinkContact{}, bin} | |
def decode(<<232, 119, 20, 235, bin::binary>>) do | |
{id, bin} = decode(:Long, bin) | |
{%WebPageEmpty{id: id}, bin} | |
end | |
def decode(<<28, 218, 134, 197, bin::binary>>) do | |
{id, bin} = decode(:Long, bin) | |
{date, bin} = decode(:Int, bin) | |
{%WebPagePending{id: id, date: date}, bin} | |
end | |
def decode(<<188, 180, 7, 95, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{id, bin} = decode(:Long, bin) | |
{url, bin} = decode(:String, bin) | |
{display_url, bin} = decode(:String, bin) | |
{hash, bin} = decode(:Int, bin) | |
{type, bin} = decode(:String, bin, flags, 1) # 0 | |
{site_name, bin} = decode(:String, bin, flags, 2) # 1 | |
{title, bin} = decode(:String, bin, flags, 4) # 2 | |
{description, bin} = decode(:String, bin, flags, 8) # 3 | |
{photo, bin} = decode(bin, flags, 16) # 4 | |
{embed_url, bin} = decode(:String, bin, flags, 32) # 5 | |
{embed_type, bin} = decode(:String, bin, flags, 32) # 5 | |
{embed_width, bin} = decode(:Int, bin, flags, 64) # 6 | |
{embed_height, bin} = decode(:Int, bin, flags, 64) # 6 | |
{duration, bin} = decode(:Int, bin, flags, 128) # 7 | |
{author, bin} = decode(:String, bin, flags, 256) # 8 | |
{document, bin} = decode(bin, flags, 512) # 9 | |
{cached_page, bin} = decode(bin, flags, 1024) # 10 | |
{%WebPage{flags: flags, id: id, url: url, display_url: display_url, hash: hash, type: type, site_name: site_name, title: title, description: description, photo: photo, embed_url: embed_url, embed_type: embed_type, embed_width: embed_width, embed_height: embed_height, duration: duration, author: author, document: document, cached_page: cached_page}, bin} | |
end | |
def decode(<<115, 148, 132, 133, bin::binary>>), do: {%WebPageNotModified{}, bin} | |
def decode(<<246, 230, 242, 123, bin::binary>>) do | |
{hash, bin} = decode(:Long, bin) | |
{flags, bin} = decode(:Int, bin) | |
{device_model, bin} = decode(:String, bin) | |
{platform, bin} = decode(:String, bin) | |
{system_version, bin} = decode(:String, bin) | |
{api_id, bin} = decode(:Int, bin) | |
{app_name, bin} = decode(:String, bin) | |
{app_version, bin} = decode(:String, bin) | |
{date_created, bin} = decode(:Int, bin) | |
{date_active, bin} = decode(:Int, bin) | |
{ip, bin} = decode(:String, bin) | |
{country, bin} = decode(:String, bin) | |
{region, bin} = decode(:String, bin) | |
{%Authorization{hash: hash, flags: flags, device_model: device_model, platform: platform, system_version: system_version, api_id: api_id, app_name: app_name, app_version: app_version, date_created: date_created, date_active: date_active, ip: ip, country: country, region: region}, bin} | |
end | |
def decode(<<222, 171, 80, 18, bin::binary>>) do | |
{authorizations, bin} = decode([:Authorization], bin) | |
{%Account.Authorizations{authorizations: authorizations}, bin} | |
end | |
def decode(<<24, 188, 218, 150, bin::binary>>) do | |
{new_salt, bin} = decode(:Bytes, bin) | |
{email_unconfirmed_pattern, bin} = decode(:String, bin) | |
{%Account.NoPassword{new_salt: new_salt, email_unconfirmed_pattern: email_unconfirmed_pattern}, bin} | |
end | |
def decode(<<28, 20, 24, 124, bin::binary>>) do | |
{current_salt, bin} = decode(:Bytes, bin) | |
{new_salt, bin} = decode(:Bytes, bin) | |
{hint, bin} = decode(:String, bin) | |
{has_recovery, bin} = decode(bin) | |
{email_unconfirmed_pattern, bin} = decode(:String, bin) | |
{%Account.Password{current_salt: current_salt, new_salt: new_salt, hint: hint, has_recovery: has_recovery, email_unconfirmed_pattern: email_unconfirmed_pattern}, bin} | |
end | |
def decode(<<179, 42, 183, 183, bin::binary>>) do | |
{email, bin} = decode(:String, bin) | |
{%Account.PasswordSettings{email: email}, bin} | |
end | |
def decode(<<235, 109, 145, 134, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{new_salt, bin} = decode(:Bytes, bin, flags, 1) # 0 | |
{new_password_hash, bin} = decode(:Bytes, bin, flags, 1) # 0 | |
{hint, bin} = decode(:String, bin, flags, 1) # 0 | |
{email, bin} = decode(:String, bin, flags, 2) # 1 | |
{%Account.PasswordInputSettings{flags: flags, new_salt: new_salt, new_password_hash: new_password_hash, hint: hint, email: email}, bin} | |
end | |
def decode(<<165, 72, 121, 19, bin::binary>>) do | |
{email_pattern, bin} = decode(:String, bin) | |
{%Auth.PasswordRecovery{email_pattern: email_pattern}, bin} | |
end | |
def decode(<<121, 183, 132, 163, bin::binary>>) do | |
{id, bin} = decode(:Int, bin) | |
{flags, bin} = decode(:Int, bin) | |
{%ReceivedNotifyMessage{id: id, flags: flags}, bin} | |
end | |
def decode(<<105, 55, 223, 105, bin::binary>>), do: {%ChatInviteEmpty{}, bin} | |
def decode(<<188, 5, 46, 252, bin::binary>>) do | |
{link, bin} = decode(:String, bin) | |
{%ChatInviteExported{link: link}, bin} | |
end | |
def decode(<<124, 109, 104, 90, bin::binary>>) do | |
{chat, bin} = decode(bin) | |
{%ChatInviteAlready{chat: chat}, bin} | |
end | |
def decode(<<88, 245, 116, 219, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{channel, bin} = decode(:True, bin, flags, 1) # 0 | |
{broadcast, bin} = decode(:True, bin, flags, 2) # 1 | |
{public, bin} = decode(:True, bin, flags, 4) # 2 | |
{megagroup, bin} = decode(:True, bin, flags, 8) # 3 | |
{title, bin} = decode(:String, bin) | |
{photo, bin} = decode(bin) | |
{participants_count, bin} = decode(:Int, bin) | |
{participants, bin} = decode([:User], bin, flags, 16) # 4 | |
{%ChatInvite{flags: flags, channel: channel, broadcast: broadcast, public: public, megagroup: megagroup, title: title, photo: photo, participants_count: participants_count, participants: participants}, bin} | |
end | |
def decode(<<149, 43, 182, 255, bin::binary>>), do: {%InputStickerSetEmpty{}, bin} | |
def decode(<<105, 162, 231, 157, bin::binary>>) do | |
{id, bin} = decode(:Long, bin) | |
{access_hash, bin} = decode(:Long, bin) | |
{%InputStickerSetID{id: id, access_hash: access_hash}, bin} | |
end | |
def decode(<<160, 200, 28, 134, bin::binary>>) do | |
{short_name, bin} = decode(:String, bin) | |
{%InputStickerSetShortName{short_name: short_name}, bin} | |
end | |
def decode(<<65, 59, 48, 205, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{installed, bin} = decode(:True, bin, flags, 1) # 0 | |
{archived, bin} = decode(:True, bin, flags, 2) # 1 | |
{official, bin} = decode(:True, bin, flags, 4) # 2 | |
{masks, bin} = decode(:True, bin, flags, 8) # 3 | |
{id, bin} = decode(:Long, bin) | |
{access_hash, bin} = decode(:Long, bin) | |
{title, bin} = decode(:String, bin) | |
{short_name, bin} = decode(:String, bin) | |
{count, bin} = decode(:Int, bin) | |
{hash, bin} = decode(:Int, bin) | |
{%StickerSet{flags: flags, installed: installed, archived: archived, official: official, masks: masks, id: id, access_hash: access_hash, title: title, short_name: short_name, count: count, hash: hash}, bin} | |
end | |
def decode(<<166, 36, 10, 182, bin::binary>>) do | |
{set, bin} = decode(bin) | |
{packs, bin} = decode([:StickerPack], bin) | |
{documents, bin} = decode([:Document], bin) | |
{%Messages.StickerSet{set: set, packs: packs, documents: documents}, bin} | |
end | |
def decode(<<199, 200, 122, 194, bin::binary>>) do | |
{command, bin} = decode(:String, bin) | |
{description, bin} = decode(:String, bin) | |
{%BotCommand{command: command, description: description}, bin} | |
end | |
def decode(<<58, 29, 232, 152, bin::binary>>) do | |
{user_id, bin} = decode(:Int, bin) | |
{description, bin} = decode(:String, bin) | |
{commands, bin} = decode([:BotCommand], bin) | |
{%BotInfo{user_id: user_id, description: description, commands: commands}, bin} | |
end | |
def decode(<<128, 72, 250, 162, bin::binary>>) do | |
{text, bin} = decode(:String, bin) | |
{%KeyboardButton{text: text}, bin} | |
end | |
def decode(<<5, 255, 138, 37, bin::binary>>) do | |
{text, bin} = decode(:String, bin) | |
{url, bin} = decode(:String, bin) | |
{%KeyboardButtonUrl{text: text, url: url}, bin} | |
end | |
def decode(<<70, 94, 58, 104, bin::binary>>) do | |
{text, bin} = decode(:String, bin) | |
{data, bin} = decode(:Bytes, bin) | |
{%KeyboardButtonCallback{text: text, data: data}, bin} | |
end | |
def decode(<<41, 108, 106, 177, bin::binary>>) do | |
{text, bin} = decode(:String, bin) | |
{%KeyboardButtonRequestPhone{text: text}, bin} | |
end | |
def decode(<<63, 107, 121, 252, bin::binary>>) do | |
{text, bin} = decode(:String, bin) | |
{%KeyboardButtonRequestGeoLocation{text: text}, bin} | |
end | |
def decode(<<72, 167, 104, 5, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{same_peer, bin} = decode(:True, bin, flags, 1) # 0 | |
{text, bin} = decode(:String, bin) | |
{query, bin} = decode(:String, bin) | |
{%KeyboardButtonSwitchInline{flags: flags, same_peer: same_peer, text: text, query: query}, bin} | |
end | |
def decode(<<207, 28, 244, 80, bin::binary>>) do | |
{text, bin} = decode(:String, bin) | |
{%KeyboardButtonGame{text: text}, bin} | |
end | |
def decode(<<131, 139, 96, 119, bin::binary>>) do | |
{buttons, bin} = decode([:KeyboardButton], bin) | |
{%KeyboardButtonRow{buttons: buttons}, bin} | |
end | |
def decode(<<133, 91, 62, 160, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{selective, bin} = decode(:True, bin, flags, 4) # 2 | |
{%ReplyKeyboardHide{flags: flags, selective: selective}, bin} | |
end | |
def decode(<<160, 138, 16, 244, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{single_use, bin} = decode(:True, bin, flags, 2) # 1 | |
{selective, bin} = decode(:True, bin, flags, 4) # 2 | |
{%ReplyKeyboardForceReply{flags: flags, single_use: single_use, selective: selective}, bin} | |
end | |
def decode(<<140, 117, 2, 53, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{resize, bin} = decode(:True, bin, flags, 1) # 0 | |
{single_use, bin} = decode(:True, bin, flags, 2) # 1 | |
{selective, bin} = decode(:True, bin, flags, 4) # 2 | |
{rows, bin} = decode([:KeyboardButtonRow], bin) | |
{%ReplyKeyboardMarkup{flags: flags, resize: resize, single_use: single_use, selective: selective, rows: rows}, bin} | |
end | |
def decode(<<84, 2, 163, 72, bin::binary>>) do | |
{rows, bin} = decode([:KeyboardButtonRow], bin) | |
{%ReplyInlineMarkup{rows: rows}, bin} | |
end | |
def decode(<<148, 3, 126, 175, bin::binary>>), do: {%Help.AppChangelogEmpty{}, bin} | |
def decode(<<124, 126, 19, 42, bin::binary>>) do | |
{message, bin} = decode(:String, bin) | |
{media, bin} = decode(bin) | |
{entities, bin} = decode([:MessageEntity], bin) | |
{%Help.AppChangelog{message: message, media: media, entities: entities}, bin} | |
end | |
def decode(<<149, 186, 146, 187, bin::binary>>) do | |
{offset, bin} = decode(:Int, bin) | |
{length, bin} = decode(:Int, bin) | |
{%MessageEntityUnknown{offset: offset, length: length}, bin} | |
end | |
def decode(<<157, 87, 4, 250, bin::binary>>) do | |
{offset, bin} = decode(:Int, bin) | |
{length, bin} = decode(:Int, bin) | |
{%MessageEntityMention{offset: offset, length: length}, bin} | |
end | |
def decode(<<13, 91, 99, 111, bin::binary>>) do | |
{offset, bin} = decode(:Int, bin) | |
{length, bin} = decode(:Int, bin) | |
{%MessageEntityHashtag{offset: offset, length: length}, bin} | |
end | |
def decode(<<199, 138, 239, 108, bin::binary>>) do | |
{offset, bin} = decode(:Int, bin) | |
{length, bin} = decode(:Int, bin) | |
{%MessageEntityBotCommand{offset: offset, length: length}, bin} | |
end | |
def decode(<<56, 37, 208, 110, bin::binary>>) do | |
{offset, bin} = decode(:Int, bin) | |
{length, bin} = decode(:Int, bin) | |
{%MessageEntityUrl{offset: offset, length: length}, bin} | |
end | |
def decode(<<194, 117, 228, 100, bin::binary>>) do | |
{offset, bin} = decode(:Int, bin) | |
{length, bin} = decode(:Int, bin) | |
{%MessageEntityEmail{offset: offset, length: length}, bin} | |
end | |
def decode(<<201, 11, 97, 189, bin::binary>>) do | |
{offset, bin} = decode(:Int, bin) | |
{length, bin} = decode(:Int, bin) | |
{%MessageEntityBold{offset: offset, length: length}, bin} | |
end | |
def decode(<<96, 139, 111, 130, bin::binary>>) do | |
{offset, bin} = decode(:Int, bin) | |
{length, bin} = decode(:Int, bin) | |
{%MessageEntityItalic{offset: offset, length: length}, bin} | |
end | |
def decode(<<113, 5, 162, 40, bin::binary>>) do | |
{offset, bin} = decode(:Int, bin) | |
{length, bin} = decode(:Int, bin) | |
{%MessageEntityCode{offset: offset, length: length}, bin} | |
end | |
def decode(<<224, 75, 146, 115, bin::binary>>) do | |
{offset, bin} = decode(:Int, bin) | |
{length, bin} = decode(:Int, bin) | |
{language, bin} = decode(:String, bin) | |
{%MessageEntityPre{offset: offset, length: length, language: language}, bin} | |
end | |
def decode(<<39, 211, 166, 118, bin::binary>>) do | |
{offset, bin} = decode(:Int, bin) | |
{length, bin} = decode(:Int, bin) | |
{url, bin} = decode(:String, bin) | |
{%MessageEntityTextUrl{offset: offset, length: length, url: url}, bin} | |
end | |
def decode(<<88, 202, 45, 53, bin::binary>>) do | |
{offset, bin} = decode(:Int, bin) | |
{length, bin} = decode(:Int, bin) | |
{user_id, bin} = decode(:Int, bin) | |
{%MessageEntityMentionName{offset: offset, length: length, user_id: user_id}, bin} | |
end | |
def decode(<<201, 104, 142, 32, bin::binary>>) do | |
{offset, bin} = decode(:Int, bin) | |
{length, bin} = decode(:Int, bin) | |
{user_id, bin} = decode(bin) | |
{%InputMessageEntityMentionName{offset: offset, length: length, user_id: user_id}, bin} | |
end | |
def decode(<<134, 30, 140, 238, bin::binary>>), do: {%InputChannelEmpty{}, bin} | |
def decode(<<46, 113, 235, 175, bin::binary>>) do | |
{channel_id, bin} = decode(:Int, bin) | |
{access_hash, bin} = decode(:Long, bin) | |
{%InputChannel{channel_id: channel_id, access_hash: access_hash}, bin} | |
end | |
def decode(<<217, 122, 7, 127, bin::binary>>) do | |
{peer, bin} = decode(bin) | |
{chats, bin} = decode([:Chat], bin) | |
{users, bin} = decode([:User], bin) | |
{%Contacts.ResolvedPeer{peer: peer, chats: chats, users: users}, bin} | |
end | |
def decode(<<83, 2, 227, 10, bin::binary>>) do | |
{min_id, bin} = decode(:Int, bin) | |
{max_id, bin} = decode(:Int, bin) | |
{%MessageRange{min_id: min_id, max_id: max_id}, bin} | |
end | |
def decode(<<251, 175, 17, 62, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{final, bin} = decode(:True, bin, flags, 1) # 0 | |
{pts, bin} = decode(:Int, bin) | |
{timeout, bin} = decode(:Int, bin, flags, 2) # 1 | |
{%Updates.ChannelDifferenceEmpty{flags: flags, final: final, pts: pts, timeout: timeout}, bin} | |
end | |
def decode(<<7, 238, 13, 65, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{final, bin} = decode(:True, bin, flags, 1) # 0 | |
{pts, bin} = decode(:Int, bin) | |
{timeout, bin} = decode(:Int, bin, flags, 2) # 1 | |
{top_message, bin} = decode(:Int, bin) | |
{read_inbox_max_id, bin} = decode(:Int, bin) | |
{read_outbox_max_id, bin} = decode(:Int, bin) | |
{unread_count, bin} = decode(:Int, bin) | |
{messages, bin} = decode([:Message], bin) | |
{chats, bin} = decode([:Chat], bin) | |
{users, bin} = decode([:User], bin) | |
{%Updates.ChannelDifferenceTooLong{flags: flags, final: final, pts: pts, timeout: timeout, top_message: top_message, read_inbox_max_id: read_inbox_max_id, read_outbox_max_id: read_outbox_max_id, unread_count: unread_count, messages: messages, chats: chats, users: users}, bin} | |
end | |
def decode(<<78, 103, 100, 32, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{final, bin} = decode(:True, bin, flags, 1) # 0 | |
{pts, bin} = decode(:Int, bin) | |
{timeout, bin} = decode(:Int, bin, flags, 2) # 1 | |
{new_messages, bin} = decode([:Message], bin) | |
{other_updates, bin} = decode([:Update], bin) | |
{chats, bin} = decode([:Chat], bin) | |
{users, bin} = decode([:User], bin) | |
{%Updates.ChannelDifference{flags: flags, final: final, pts: pts, timeout: timeout, new_messages: new_messages, other_updates: other_updates, chats: chats, users: users}, bin} | |
end | |
def decode(<<231, 46, 212, 148, bin::binary>>), do: {%ChannelMessagesFilterEmpty{}, bin} | |
def decode(<<87, 217, 119, 205, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{exclude_new_messages, bin} = decode(:True, bin, flags, 2) # 1 | |
{ranges, bin} = decode([:MessageRange], bin) | |
{%ChannelMessagesFilter{flags: flags, exclude_new_messages: exclude_new_messages, ranges: ranges}, bin} | |
end | |
def decode(<<29, 172, 235, 21, bin::binary>>) do | |
{user_id, bin} = decode(:Int, bin) | |
{date, bin} = decode(:Int, bin) | |
{%ChannelParticipant{user_id: user_id, date: date}, bin} | |
end | |
def decode(<<109, 154, 40, 163, bin::binary>>) do | |
{user_id, bin} = decode(:Int, bin) | |
{inviter_id, bin} = decode(:Int, bin) | |
{date, bin} = decode(:Int, bin) | |
{%ChannelParticipantSelf{user_id: user_id, inviter_id: inviter_id, date: date}, bin} | |
end | |
def decode(<<239, 127, 5, 145, bin::binary>>) do | |
{user_id, bin} = decode(:Int, bin) | |
{inviter_id, bin} = decode(:Int, bin) | |
{date, bin} = decode(:Int, bin) | |
{%ChannelParticipantModerator{user_id: user_id, inviter_id: inviter_id, date: date}, bin} | |
end | |
def decode(<<97, 45, 25, 152, bin::binary>>) do | |
{user_id, bin} = decode(:Int, bin) | |
{inviter_id, bin} = decode(:Int, bin) | |
{date, bin} = decode(:Int, bin) | |
{%ChannelParticipantEditor{user_id: user_id, inviter_id: inviter_id, date: date}, bin} | |
end | |
def decode(<<154, 230, 197, 140, bin::binary>>) do | |
{user_id, bin} = decode(:Int, bin) | |
{kicked_by, bin} = decode(:Int, bin) | |
{date, bin} = decode(:Int, bin) | |
{%ChannelParticipantKicked{user_id: user_id, kicked_by: kicked_by, date: date}, bin} | |
end | |
def decode(<<249, 225, 226, 227, bin::binary>>) do | |
{user_id, bin} = decode(:Int, bin) | |
{%ChannelParticipantCreator{user_id: user_id}, bin} | |
end | |
def decode(<<121, 60, 63, 222, bin::binary>>), do: {%ChannelParticipantsRecent{}, bin} | |
def decode(<<105, 137, 96, 180, bin::binary>>), do: {%ChannelParticipantsAdmins{}, bin} | |
def decode(<<122, 187, 55, 60, bin::binary>>), do: {%ChannelParticipantsKicked{}, bin} | |
def decode(<<91, 134, 209, 176, bin::binary>>), do: {%ChannelParticipantsBots{}, bin} | |
def decode(<<198, 160, 133, 178, bin::binary>>), do: {%ChannelRoleEmpty{}, bin} | |
def decode(<<117, 217, 24, 150, bin::binary>>), do: {%ChannelRoleModerator{}, bin} | |
def decode(<<140, 254, 11, 130, bin::binary>>), do: {%ChannelRoleEditor{}, bin} | |
def decode(<<168, 226, 110, 245, bin::binary>>) do | |
{count, bin} = decode(:Int, bin) | |
{participants, bin} = decode([:ChannelParticipant], bin) | |
{users, bin} = decode([:User], bin) | |
{%Channels.ChannelParticipants{count: count, participants: participants, users: users}, bin} | |
end | |
def decode(<<99, 177, 217, 208, bin::binary>>) do | |
{participant, bin} = decode(bin) | |
{users, bin} = decode([:User], bin) | |
{%Channels.ChannelParticipant{participant: participant, users: users}, bin} | |
end | |
def decode(<<144, 62, 238, 241, bin::binary>>) do | |
{text, bin} = decode(:String, bin) | |
{%Help.TermsOfService{text: text}, bin} | |
end | |
def decode(<<31, 204, 46, 22, bin::binary>>) do | |
{url, bin} = decode(:String, bin) | |
{thumb_url, bin} = decode(:String, bin) | |
{content_url, bin} = decode(:String, bin) | |
{content_type, bin} = decode(:String, bin) | |
{w, bin} = decode(:Int, bin) | |
{h, bin} = decode(:Int, bin) | |
{%FoundGif{url: url, thumb_url: thumb_url, content_url: content_url, content_type: content_type, w: w, h: h}, bin} | |
end | |
def decode(<<9, 4, 117, 156, bin::binary>>) do | |
{url, bin} = decode(:String, bin) | |
{photo, bin} = decode(bin) | |
{document, bin} = decode(bin) | |
{%FoundGifCached{url: url, photo: photo, document: document}, bin} | |
end | |
def decode(<<10, 28, 10, 69, bin::binary>>) do | |
{next_offset, bin} = decode(:Int, bin) | |
{results, bin} = decode([:FoundGif], bin) | |
{%Messages.FoundGifs{next_offset: next_offset, results: results}, bin} | |
end | |
def decode(<<162, 92, 2, 232, bin::binary>>), do: {%Messages.SavedGifsNotModified{}, bin} | |
def decode(<<165, 9, 7, 46, bin::binary>>) do | |
{hash, bin} = decode(:Int, bin) | |
{gifs, bin} = decode([:Document], bin) | |
{%Messages.SavedGifs{hash: hash, gifs: gifs}, bin} | |
end | |
def decode(<<19, 237, 47, 41, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{caption, bin} = decode(:String, bin) | |
{reply_markup, bin} = decode(bin, flags, 4) # 2 | |
{%InputBotInlineMessageMediaAuto{flags: flags, caption: caption, reply_markup: reply_markup}, bin} | |
end | |
def decode(<<135, 122, 205, 61, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{no_webpage, bin} = decode(:True, bin, flags, 1) # 0 | |
{message, bin} = decode(:String, bin) | |
{entities, bin} = decode([:MessageEntity], bin, flags, 2) # 1 | |
{reply_markup, bin} = decode(bin, flags, 4) # 2 | |
{%InputBotInlineMessageText{flags: flags, no_webpage: no_webpage, message: message, entities: entities, reply_markup: reply_markup}, bin} | |
end | |
def decode(<<225, 157, 165, 244, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{geo_point, bin} = decode(bin) | |
{reply_markup, bin} = decode(bin, flags, 4) # 2 | |
{%InputBotInlineMessageMediaGeo{flags: flags, geo_point: geo_point, reply_markup: reply_markup}, bin} | |
end | |
def decode(<<200, 173, 175, 170, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{geo_point, bin} = decode(bin) | |
{title, bin} = decode(:String, bin) | |
{address, bin} = decode(:String, bin) | |
{provider, bin} = decode(:String, bin) | |
{venue_id, bin} = decode(:String, bin) | |
{reply_markup, bin} = decode(bin, flags, 4) # 2 | |
{%InputBotInlineMessageMediaVenue{flags: flags, geo_point: geo_point, title: title, address: address, provider: provider, venue_id: venue_id, reply_markup: reply_markup}, bin} | |
end | |
def decode(<<167, 1, 175, 45, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{phone_number, bin} = decode(:String, bin) | |
{first_name, bin} = decode(:String, bin) | |
{last_name, bin} = decode(:String, bin) | |
{reply_markup, bin} = decode(bin, flags, 4) # 2 | |
{%InputBotInlineMessageMediaContact{flags: flags, phone_number: phone_number, first_name: first_name, last_name: last_name, reply_markup: reply_markup}, bin} | |
end | |
def decode(<<100, 88, 66, 75, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{reply_markup, bin} = decode(bin, flags, 4) # 2 | |
{%InputBotInlineMessageGame{flags: flags, reply_markup: reply_markup}, bin} | |
end | |
def decode(<<90, 225, 187, 44, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{id, bin} = decode(:String, bin) | |
{type, bin} = decode(:String, bin) | |
{title, bin} = decode(:String, bin, flags, 2) # 1 | |
{description, bin} = decode(:String, bin, flags, 4) # 2 | |
{url, bin} = decode(:String, bin, flags, 8) # 3 | |
{thumb_url, bin} = decode(:String, bin, flags, 16) # 4 | |
{content_url, bin} = decode(:String, bin, flags, 32) # 5 | |
{content_type, bin} = decode(:String, bin, flags, 32) # 5 | |
{w, bin} = decode(:Int, bin, flags, 64) # 6 | |
{h, bin} = decode(:Int, bin, flags, 64) # 6 | |
{duration, bin} = decode(:Int, bin, flags, 128) # 7 | |
{send_message, bin} = decode(bin) | |
{%InputBotInlineResult{flags: flags, id: id, type: type, title: title, description: description, url: url, thumb_url: thumb_url, content_url: content_url, content_type: content_type, w: w, h: h, duration: duration, send_message: send_message}, bin} | |
end | |
def decode(<<167, 100, 216, 168, bin::binary>>) do | |
{id, bin} = decode(:String, bin) | |
{type, bin} = decode(:String, bin) | |
{photo, bin} = decode(bin) | |
{send_message, bin} = decode(bin) | |
{%InputBotInlineResultPhoto{id: id, type: type, photo: photo, send_message: send_message}, bin} | |
end | |
def decode(<<196, 253, 248, 255, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{id, bin} = decode(:String, bin) | |
{type, bin} = decode(:String, bin) | |
{title, bin} = decode(:String, bin, flags, 2) # 1 | |
{description, bin} = decode(:String, bin, flags, 4) # 2 | |
{document, bin} = decode(bin) | |
{send_message, bin} = decode(bin) | |
{%InputBotInlineResultDocument{flags: flags, id: id, type: type, title: title, description: description, document: document, send_message: send_message}, bin} | |
end | |
def decode(<<242, 23, 164, 79, bin::binary>>) do | |
{id, bin} = decode(:String, bin) | |
{short_name, bin} = decode(:String, bin) | |
{send_message, bin} = decode(bin) | |
{%InputBotInlineResultGame{id: id, short_name: short_name, send_message: send_message}, bin} | |
end | |
def decode(<<91, 177, 116, 10, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{caption, bin} = decode(:String, bin) | |
{reply_markup, bin} = decode(bin, flags, 4) # 2 | |
{%BotInlineMessageMediaAuto{flags: flags, caption: caption, reply_markup: reply_markup}, bin} | |
end | |
def decode(<<226, 101, 127, 140, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{no_webpage, bin} = decode(:True, bin, flags, 1) # 0 | |
{message, bin} = decode(:String, bin) | |
{entities, bin} = decode([:MessageEntity], bin, flags, 2) # 1 | |
{reply_markup, bin} = decode(bin, flags, 4) # 2 | |
{%BotInlineMessageText{flags: flags, no_webpage: no_webpage, message: message, entities: entities, reply_markup: reply_markup}, bin} | |
end | |
def decode(<<184, 216, 143, 58, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{geo, bin} = decode(bin) | |
{reply_markup, bin} = decode(bin, flags, 4) # 2 | |
{%BotInlineMessageMediaGeo{flags: flags, geo: geo, reply_markup: reply_markup}, bin} | |
end | |
def decode(<<46, 35, 102, 67, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{geo, bin} = decode(bin) | |
{title, bin} = decode(:String, bin) | |
{address, bin} = decode(:String, bin) | |
{provider, bin} = decode(:String, bin) | |
{venue_id, bin} = decode(:String, bin) | |
{reply_markup, bin} = decode(bin, flags, 4) # 2 | |
{%BotInlineMessageMediaVenue{flags: flags, geo: geo, title: title, address: address, provider: provider, venue_id: venue_id, reply_markup: reply_markup}, bin} | |
end | |
def decode(<<212, 180, 237, 53, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{phone_number, bin} = decode(:String, bin) | |
{first_name, bin} = decode(:String, bin) | |
{last_name, bin} = decode(:String, bin) | |
{reply_markup, bin} = decode(bin, flags, 4) # 2 | |
{%BotInlineMessageMediaContact{flags: flags, phone_number: phone_number, first_name: first_name, last_name: last_name, reply_markup: reply_markup}, bin} | |
end | |
def decode(<<185, 174, 235, 155, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{id, bin} = decode(:String, bin) | |
{type, bin} = decode(:String, bin) | |
{title, bin} = decode(:String, bin, flags, 2) # 1 | |
{description, bin} = decode(:String, bin, flags, 4) # 2 | |
{url, bin} = decode(:String, bin, flags, 8) # 3 | |
{thumb_url, bin} = decode(:String, bin, flags, 16) # 4 | |
{content_url, bin} = decode(:String, bin, flags, 32) # 5 | |
{content_type, bin} = decode(:String, bin, flags, 32) # 5 | |
{w, bin} = decode(:Int, bin, flags, 64) # 6 | |
{h, bin} = decode(:Int, bin, flags, 64) # 6 | |
{duration, bin} = decode(:Int, bin, flags, 128) # 7 | |
{send_message, bin} = decode(bin) | |
{%BotInlineResult{flags: flags, id: id, type: type, title: title, description: description, url: url, thumb_url: thumb_url, content_url: content_url, content_type: content_type, w: w, h: h, duration: duration, send_message: send_message}, bin} | |
end | |
def decode(<<11, 148, 219, 23, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{id, bin} = decode(:String, bin) | |
{type, bin} = decode(:String, bin) | |
{photo, bin} = decode(bin, flags, 1) # 0 | |
{document, bin} = decode(bin, flags, 2) # 1 | |
{title, bin} = decode(:String, bin, flags, 4) # 2 | |
{description, bin} = decode(:String, bin, flags, 8) # 3 | |
{send_message, bin} = decode(bin) | |
{%BotInlineMediaResult{flags: flags, id: id, type: type, photo: photo, document: document, title: title, description: description, send_message: send_message}, bin} | |
end | |
def decode(<<61, 86, 211, 204, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{gallery, bin} = decode(:True, bin, flags, 1) # 0 | |
{query_id, bin} = decode(:Long, bin) | |
{next_offset, bin} = decode(:String, bin, flags, 2) # 1 | |
{switch_pm, bin} = decode(bin, flags, 4) # 2 | |
{results, bin} = decode([:BotInlineResult], bin) | |
{cache_time, bin} = decode(:Int, bin) | |
{%Messages.BotResults{flags: flags, gallery: gallery, query_id: query_id, next_offset: next_offset, switch_pm: switch_pm, results: results, cache_time: cache_time}, bin} | |
end | |
def decode(<<3, 104, 72, 31, bin::binary>>) do | |
{link, bin} = decode(:String, bin) | |
{%ExportedMessageLink{link: link}, bin} | |
end | |
def decode(<<203, 221, 134, 199, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{from_id, bin} = decode(:Int, bin, flags, 1) # 0 | |
{date, bin} = decode(:Int, bin) | |
{channel_id, bin} = decode(:Int, bin, flags, 2) # 1 | |
{channel_post, bin} = decode(:Int, bin, flags, 4) # 2 | |
{%MessageFwdHeader{flags: flags, from_id: from_id, date: date, channel_id: channel_id, channel_post: channel_post}, bin} | |
end | |
def decode(<<140, 21, 163, 114, bin::binary>>), do: {%Auth.CodeTypeSms{}, bin} | |
def decode(<<227, 211, 28, 116, bin::binary>>), do: {%Auth.CodeTypeCall{}, bin} | |
def decode(<<251, 206, 108, 34, bin::binary>>), do: {%Auth.CodeTypeFlashCall{}, bin} | |
def decode(<<134, 89, 187, 61, bin::binary>>) do | |
{length, bin} = decode(:Int, bin) | |
{%Auth.SentCodeTypeApp{length: length}, bin} | |
end | |
def decode(<<162, 187, 0, 192, bin::binary>>) do | |
{length, bin} = decode(:Int, bin) | |
{%Auth.SentCodeTypeSms{length: length}, bin} | |
end | |
def decode(<<167, 229, 83, 83, bin::binary>>) do | |
{length, bin} = decode(:Int, bin) | |
{%Auth.SentCodeTypeCall{length: length}, bin} | |
end | |
def decode(<<217, 198, 3, 171, bin::binary>>) do | |
{pattern, bin} = decode(:String, bin) | |
{%Auth.SentCodeTypeFlashCall{pattern: pattern}, bin} | |
end | |
def decode(<<164, 94, 88, 54, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{alert, bin} = decode(:True, bin, flags, 2) # 1 | |
{has_url, bin} = decode(:True, bin, flags, 8) # 3 | |
{message, bin} = decode(:String, bin, flags, 1) # 0 | |
{url, bin} = decode(:String, bin, flags, 4) # 2 | |
{cache_time, bin} = decode(:Int, bin) | |
{%Messages.BotCallbackAnswer{flags: flags, alert: alert, has_url: has_url, message: message, url: url, cache_time: cache_time}, bin} | |
end | |
def decode(<<230, 221, 181, 38, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{caption, bin} = decode(:True, bin, flags, 1) # 0 | |
{%Messages.MessageEditData{flags: flags, caption: caption}, bin} | |
end | |
def decode(<<137, 61, 12, 137, bin::binary>>) do | |
{dc_id, bin} = decode(:Int, bin) | |
{id, bin} = decode(:Long, bin) | |
{access_hash, bin} = decode(:Long, bin) | |
{%InputBotInlineMessageID{dc_id: dc_id, id: id, access_hash: access_hash}, bin} | |
end | |
def decode(<<159, 98, 32, 60, bin::binary>>) do | |
{text, bin} = decode(:String, bin) | |
{start_param, bin} = decode(:String, bin) | |
{%InlineBotSwitchPM{text: text, start_param: start_param}, bin} | |
end | |
def decode(<<84, 195, 113, 51, bin::binary>>) do | |
{dialogs, bin} = decode([:Dialog], bin) | |
{messages, bin} = decode([:Message], bin) | |
{chats, bin} = decode([:Chat], bin) | |
{users, bin} = decode([:User], bin) | |
{state, bin} = decode(bin) | |
{%Messages.PeerDialogs{dialogs: dialogs, messages: messages, chats: chats, users: users, state: state}, bin} | |
end | |
def decode(<<91, 192, 205, 237, bin::binary>>) do | |
{peer, bin} = decode(bin) | |
{rating, bin} = decode(:Double, bin) | |
{%TopPeer{peer: peer, rating: rating}, bin} | |
end | |
def decode(<<91, 27, 102, 171, bin::binary>>), do: {%TopPeerCategoryBotsPM{}, bin} | |
def decode(<<226, 119, 134, 20, bin::binary>>), do: {%TopPeerCategoryBotsInline{}, bin} | |
def decode(<<237, 183, 55, 6, bin::binary>>), do: {%TopPeerCategoryCorrespondents{}, bin} | |
def decode(<<74, 161, 23, 189, bin::binary>>), do: {%TopPeerCategoryGroups{}, bin} | |
def decode(<<40, 150, 29, 22, bin::binary>>), do: {%TopPeerCategoryChannels{}, bin} | |
def decode(<<145, 66, 131, 251, bin::binary>>) do | |
{category, bin} = decode(bin) | |
{count, bin} = decode(:Int, bin) | |
{peers, bin} = decode([:TopPeer], bin) | |
{%TopPeerCategoryPeers{category: category, count: count, peers: peers}, bin} | |
end | |
def decode(<<245, 110, 38, 222, bin::binary>>), do: {%Contacts.TopPeersNotModified{}, bin} | |
def decode(<<168, 114, 183, 112, bin::binary>>) do | |
{categories, bin} = decode([:TopPeerCategoryPeers], bin) | |
{chats, bin} = decode([:Chat], bin) | |
{users, bin} = decode([:User], bin) | |
{%Contacts.TopPeers{categories: categories, chats: chats, users: users}, bin} | |
end | |
def decode(<<197, 174, 75, 186, bin::binary>>), do: {%DraftMessageEmpty{}, bin} | |
def decode(<<31, 113, 142, 253, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{no_webpage, bin} = decode(:True, bin, flags, 2) # 1 | |
{reply_to_msg_id, bin} = decode(:Int, bin, flags, 1) # 0 | |
{message, bin} = decode(:String, bin) | |
{entities, bin} = decode([:MessageEntity], bin, flags, 8) # 3 | |
{date, bin} = decode(:Int, bin) | |
{%DraftMessage{flags: flags, no_webpage: no_webpage, reply_to_msg_id: reply_to_msg_id, message: message, entities: entities, date: date}, bin} | |
end | |
def decode(<<207, 227, 237, 4, bin::binary>>), do: {%Messages.FeaturedStickersNotModified{}, bin} | |
def decode(<<229, 136, 157, 248, bin::binary>>) do | |
{hash, bin} = decode(:Int, bin) | |
{sets, bin} = decode([:StickerSetCovered], bin) | |
{unread, bin} = decode([:Long], bin) | |
{%Messages.FeaturedStickers{hash: hash, sets: sets, unread: unread}, bin} | |
end | |
def decode(<<144, 248, 23, 11, bin::binary>>), do: {%Messages.RecentStickersNotModified{}, bin} | |
def decode(<<112, 9, 226, 92, bin::binary>>) do | |
{hash, bin} = decode(:Int, bin) | |
{stickers, bin} = decode([:Document], bin) | |
{%Messages.RecentStickers{hash: hash, stickers: stickers}, bin} | |
end | |
def decode(<<200, 169, 203, 79, bin::binary>>) do | |
{count, bin} = decode(:Int, bin) | |
{sets, bin} = decode([:StickerSetCovered], bin) | |
{%Messages.ArchivedStickers{count: count, sets: sets}, bin} | |
end | |
def decode(<<40, 22, 100, 56, bin::binary>>), do: {%Messages.StickerSetInstallResultSuccess{}, bin} | |
def decode(<<168, 16, 228, 53, bin::binary>>) do | |
{sets, bin} = decode([:StickerSetCovered], bin) | |
{%Messages.StickerSetInstallResultArchive{sets: sets}, bin} | |
end | |
def decode(<<210, 165, 16, 100, bin::binary>>) do | |
{set, bin} = decode(bin) | |
{cover, bin} = decode(bin) | |
{%StickerSetCovered{set: set, cover: cover}, bin} | |
end | |
def decode(<<27, 229, 7, 52, bin::binary>>) do | |
{set, bin} = decode(bin) | |
{covers, bin} = decode([:Document], bin) | |
{%StickerSetMultiCovered{set: set, covers: covers}, bin} | |
end | |
def decode(<<178, 219, 214, 174, bin::binary>>) do | |
{n, bin} = decode(:Int, bin) | |
{x, bin} = decode(:Double, bin) | |
{y, bin} = decode(:Double, bin) | |
{zoom, bin} = decode(:Double, bin) | |
{%MaskCoords{n: n, x: x, y: y, zoom: zoom}, bin} | |
end | |
def decode(<<87, 33, 153, 74, bin::binary>>) do | |
{id, bin} = decode(bin) | |
{%InputStickeredMediaPhoto{id: id}, bin} | |
end | |
def decode(<<91, 134, 56, 4, bin::binary>>) do | |
{id, bin} = decode(bin) | |
{%InputStickeredMediaDocument{id: id}, bin} | |
end | |
def decode(<<59, 101, 249, 189, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{id, bin} = decode(:Long, bin) | |
{access_hash, bin} = decode(:Long, bin) | |
{short_name, bin} = decode(:String, bin) | |
{title, bin} = decode(:String, bin) | |
{description, bin} = decode(:String, bin) | |
{photo, bin} = decode(bin) | |
{document, bin} = decode(bin, flags, 1) # 0 | |
{%Game{flags: flags, id: id, access_hash: access_hash, short_name: short_name, title: title, description: description, photo: photo, document: document}, bin} | |
end | |
def decode(<<119, 62, 44, 3, bin::binary>>) do | |
{id, bin} = decode(:Long, bin) | |
{access_hash, bin} = decode(:Long, bin) | |
{%InputGameID{id: id, access_hash: access_hash}, bin} | |
end | |
def decode(<<10, 232, 49, 195, bin::binary>>) do | |
{bot_id, bin} = decode(bin) | |
{short_name, bin} = decode(:String, bin) | |
{%InputGameShortName{bot_id: bot_id, short_name: short_name}, bin} | |
end | |
def decode(<<208, 252, 255, 88, bin::binary>>) do | |
{pos, bin} = decode(:Int, bin) | |
{user_id, bin} = decode(:Int, bin) | |
{score, bin} = decode(:Int, bin) | |
{%HighScore{pos: pos, user_id: user_id, score: score}, bin} | |
end | |
def decode(<<153, 253, 59, 154, bin::binary>>) do | |
{scores, bin} = decode([:HighScore], bin) | |
{users, bin} = decode([:User], bin) | |
{%Messages.HighScores{scores: scores, users: users}, bin} | |
end | |
def decode(<<79, 130, 61, 220, bin::binary>>), do: {%TextEmpty{}, bin} | |
def decode(<<224, 148, 70, 116, bin::binary>>) do | |
{text, bin} = decode(:String, bin) | |
{%TextPlain{text: text}, bin} | |
end | |
def decode(<<196, 171, 36, 103, bin::binary>>) do | |
{text, bin} = decode(bin) | |
{%TextBold{text: text}, bin} | |
end | |
def decode(<<156, 165, 18, 217, bin::binary>>) do | |
{text, bin} = decode(bin) | |
{%TextItalic{text: text}, bin} | |
end | |
def decode(<<196, 34, 38, 193, bin::binary>>) do | |
{text, bin} = decode(bin) | |
{%TextUnderline{text: text}, bin} | |
end | |
def decode(<<149, 187, 248, 155, bin::binary>>) do | |
{text, bin} = decode(bin) | |
{%TextStrike{text: text}, bin} | |
end | |
def decode(<<185, 25, 63, 108, bin::binary>>) do | |
{text, bin} = decode(bin) | |
{%TextFixed{text: text}, bin} | |
end | |
def decode(<<193, 132, 40, 60, bin::binary>>) do | |
{text, bin} = decode(bin) | |
{url, bin} = decode(:String, bin) | |
{webpage_id, bin} = decode(:Long, bin) | |
{%TextUrl{text: text, url: url, webpage_id: webpage_id}, bin} | |
end | |
def decode(<<214, 13, 90, 222, bin::binary>>) do | |
{text, bin} = decode(bin) | |
{email, bin} = decode(:String, bin) | |
{%TextEmail{text: text, email: email}, bin} | |
end | |
def decode(<<215, 96, 98, 126, bin::binary>>) do | |
{texts, bin} = decode([:RichText], bin) | |
{%TextConcat{texts: texts}, bin} | |
end | |
def decode(<<138, 126, 86, 19, bin::binary>>), do: {%PageBlockUnsupported{}, bin} | |
def decode(<<253, 195, 171, 112, bin::binary>>) do | |
{text, bin} = decode(bin) | |
{%PageBlockTitle{text: text}, bin} | |
end | |
def decode(<<31, 154, 250, 143, bin::binary>>) do | |
{text, bin} = decode(bin) | |
{%PageBlockSubtitle{text: text}, bin} | |
end | |
def decode(<<224, 229, 175, 186, bin::binary>>) do | |
{author, bin} = decode(bin) | |
{published_date, bin} = decode(:Int, bin) | |
{%PageBlockAuthorDate{author: author, published_date: published_date}, bin} | |
end | |
def decode(<<236, 100, 208, 191, bin::binary>>) do | |
{text, bin} = decode(bin) | |
{%PageBlockHeader{text: text}, bin} | |
end | |
def decode(<<225, 182, 43, 241, bin::binary>>) do | |
{text, bin} = decode(bin) | |
{%PageBlockSubheader{text: text}, bin} | |
end | |
def decode(<<102, 7, 122, 70, bin::binary>>) do | |
{text, bin} = decode(bin) | |
{%PageBlockParagraph{text: text}, bin} | |
end | |
def decode(<<62, 217, 112, 192, bin::binary>>) do | |
{text, bin} = decode(bin) | |
{language, bin} = decode(:String, bin) | |
{%PageBlockPreformatted{text: text, language: language}, bin} | |
end | |
def decode(<<153, 9, 135, 72, bin::binary>>) do | |
{text, bin} = decode(bin) | |
{%PageBlockFooter{text: text}, bin} | |
end | |
def decode(<<136, 177, 32, 219, bin::binary>>), do: {%PageBlockDivider{}, bin} | |
def decode(<<176, 55, 13, 206, bin::binary>>) do | |
{name, bin} = decode(:String, bin) | |
{%PageBlockAnchor{name: name}, bin} | |
end | |
def decode(<<244, 199, 88, 58, bin::binary>>) do | |
{ordered, bin} = decode(bin) | |
{items, bin} = decode([:RichText], bin) | |
{%PageBlockList{ordered: ordered, items: items}, bin} | |
end | |
def decode(<<38, 124, 61, 38, bin::binary>>) do | |
{text, bin} = decode(bin) | |
{caption, bin} = decode(bin) | |
{%PageBlockBlockquote{text: text, caption: caption}, bin} | |
end | |
def decode(<<211, 86, 68, 79, bin::binary>>) do | |
{text, bin} = decode(bin) | |
{caption, bin} = decode(bin) | |
{%PageBlockPullquote{text: text, caption: caption}, bin} | |
end | |
def decode(<<130, 153, 198, 233, bin::binary>>) do | |
{photo_id, bin} = decode(:Long, bin) | |
{caption, bin} = decode(bin) | |
{%PageBlockPhoto{photo_id: photo_id, caption: caption}, bin} | |
end | |
def decode(<<102, 24, 215, 217, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{autoplay, bin} = decode(:True, bin, flags, 1) # 0 | |
{loop, bin} = decode(:True, bin, flags, 2) # 1 | |
{video_id, bin} = decode(:Long, bin) | |
{caption, bin} = decode(bin) | |
{%PageBlockVideo{flags: flags, autoplay: autoplay, loop: loop, video_id: video_id, caption: caption}, bin} | |
end | |
def decode(<<0, 51, 242, 57, bin::binary>>) do | |
{cover, bin} = decode(bin) | |
{%PageBlockCover{cover: cover}, bin} | |
end | |
def decode(<<209, 0, 226, 205, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{full_width, bin} = decode(:True, bin, flags, 1) # 0 | |
{allow_scrolling, bin} = decode(:True, bin, flags, 8) # 3 | |
{url, bin} = decode(:String, bin, flags, 2) # 1 | |
{html, bin} = decode(:String, bin, flags, 4) # 2 | |
{poster_photo_id, bin} = decode(:Long, bin, flags, 16) # 4 | |
{w, bin} = decode(:Int, bin) | |
{h, bin} = decode(:Int, bin) | |
{caption, bin} = decode(bin) | |
{%PageBlockEmbed{flags: flags, full_width: full_width, allow_scrolling: allow_scrolling, url: url, html: html, poster_photo_id: poster_photo_id, w: w, h: h, caption: caption}, bin} | |
end | |
def decode(<<233, 123, 44, 41, bin::binary>>) do | |
{url, bin} = decode(:String, bin) | |
{webpage_id, bin} = decode(:Long, bin) | |
{author_photo_id, bin} = decode(:Long, bin) | |
{author, bin} = decode(:String, bin) | |
{date, bin} = decode(:Int, bin) | |
{blocks, bin} = decode([:PageBlock], bin) | |
{caption, bin} = decode(bin) | |
{%PageBlockEmbedPost{url: url, webpage_id: webpage_id, author_photo_id: author_photo_id, author: author, date: date, blocks: blocks, caption: caption}, bin} | |
end | |
def decode(<<79, 28, 179, 8, bin::binary>>) do | |
{items, bin} = decode([:PageBlock], bin) | |
{caption, bin} = decode(bin) | |
{%PageBlockCollage{items: items, caption: caption}, bin} | |
end | |
def decode(<<99, 137, 12, 19, bin::binary>>) do | |
{items, bin} = decode([:PageBlock], bin) | |
{caption, bin} = decode(bin) | |
{%PageBlockSlideshow{items: items, caption: caption}, bin} | |
end | |
def decode(<<68, 108, 238, 141, bin::binary>>) do | |
{blocks, bin} = decode([:PageBlock], bin) | |
{photos, bin} = decode([:Photo], bin) | |
{videos, bin} = decode([:Document], bin) | |
{%PagePart{blocks: blocks, photos: photos, videos: videos}, bin} | |
end | |
def decode(<<105, 157, 161, 215, bin::binary>>) do | |
{blocks, bin} = decode([:PageBlock], bin) | |
{photos, bin} = decode([:Photo], bin) | |
{videos, bin} = decode([:Document], bin) | |
{%PageFull{blocks: blocks, photos: photos, videos: videos}, bin} | |
end | |
def decode(<<237, 253, 54, 30, bin::binary>>) do | |
{id, bin} = decode(:Long, bin) | |
{access_hash, bin} = decode(:Long, bin) | |
{%InputPhoneCall{id: id, access_hash: access_hash}, bin} | |
end | |
def decode(<<21, 201, 102, 83, bin::binary>>) do | |
{id, bin} = decode(:Long, bin) | |
{%PhoneCallEmpty{id: id}, bin} | |
end | |
def decode(<<209, 74, 143, 27, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{id, bin} = decode(:Long, bin) | |
{access_hash, bin} = decode(:Long, bin) | |
{date, bin} = decode(:Int, bin) | |
{admin_id, bin} = decode(:Int, bin) | |
{participant_id, bin} = decode(:Int, bin) | |
{protocol, bin} = decode(bin) | |
{receive_date, bin} = decode(:Int, bin, flags, 1) # 0 | |
{%PhoneCallWaiting{flags: flags, id: id, access_hash: access_hash, date: date, admin_id: admin_id, participant_id: participant_id, protocol: protocol, receive_date: receive_date}, bin} | |
end | |
def decode(<<232, 138, 68, 108, bin::binary>>) do | |
{id, bin} = decode(:Long, bin) | |
{access_hash, bin} = decode(:Long, bin) | |
{date, bin} = decode(:Int, bin) | |
{admin_id, bin} = decode(:Int, bin) | |
{participant_id, bin} = decode(:Int, bin) | |
{g_a, bin} = decode(:Bytes, bin) | |
{protocol, bin} = decode(bin) | |
{%PhoneCallRequested{id: id, access_hash: access_hash, date: date, admin_id: admin_id, participant_id: participant_id, g_a: g_a, protocol: protocol}, bin} | |
end | |
def decode(<<103, 171, 230, 255, bin::binary>>) do | |
{id, bin} = decode(:Long, bin) | |
{access_hash, bin} = decode(:Long, bin) | |
{date, bin} = decode(:Int, bin) | |
{admin_id, bin} = decode(:Int, bin) | |
{participant_id, bin} = decode(:Int, bin) | |
{g_a_or_b, bin} = decode(:Bytes, bin) | |
{key_fingerprint, bin} = decode(:Long, bin) | |
{protocol, bin} = decode(bin) | |
{connection, bin} = decode(bin) | |
{alternative_connections, bin} = decode([:PhoneConnection], bin) | |
{start_date, bin} = decode(:Int, bin) | |
{%PhoneCall{id: id, access_hash: access_hash, date: date, admin_id: admin_id, participant_id: participant_id, g_a_or_b: g_a_or_b, key_fingerprint: key_fingerprint, protocol: protocol, connection: connection, alternative_connections: alternative_connections, start_date: start_date}, bin} | |
end | |
def decode(<<225, 77, 202, 80, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{id, bin} = decode(:Long, bin) | |
{reason, bin} = decode(bin, flags, 1) # 0 | |
{duration, bin} = decode(:Int, bin, flags, 2) # 1 | |
{%PhoneCallDiscarded{flags: flags, id: id, reason: reason, duration: duration}, bin} | |
end | |
def decode(<<192, 23, 76, 157, bin::binary>>) do | |
{id, bin} = decode(:Long, bin) | |
{ip, bin} = decode(:String, bin) | |
{ipv6, bin} = decode(:String, bin) | |
{port, bin} = decode(:Int, bin) | |
{peer_tag, bin} = decode(:Bytes, bin) | |
{%PhoneConnection{id: id, ip: ip, ipv6: ipv6, port: port, peer_tag: peer_tag}, bin} | |
end | |
def decode(<<203, 53, 187, 162, bin::binary>>) do | |
{flags, bin} = decode(:Int, bin) | |
{udp_p2p, bin} = decode(:True, bin, flags, 1) # 0 | |
{udp_reflector, bin} = decode(:True, bin, flags, 2) # 1 | |
{min_layer, bin} = decode(:Int, bin) | |
{max_layer, bin} = decode(:Int, bin) | |
{%PhoneCallProtocol{flags: flags, udp_p2p: udp_p2p, udp_reflector: udp_reflector, min_layer: min_layer, max_layer: max_layer}, bin} | |
end | |
def decode(<<64, 225, 130, 236, bin::binary>>) do | |
{phone_call, bin} = decode(bin) | |
{users, bin} = decode([:User], bin) | |
{%Phone.PhoneCall{phone_call: phone_call, users: users}, bin} | |
end | |
def decode(<<1, 35, 228, 133, bin::binary>>), do: {%PhoneCallDiscardReasonMissed{}, bin} | |
def decode(<<160, 193, 149, 224, bin::binary>>), do: {%PhoneCallDiscardReasonDisconnect{}, bin} | |
def decode(<<144, 198, 173, 87, bin::binary>>), do: {%PhoneCallDiscardReasonHangup{}, bin} | |
def decode(<<201, 232, 247, 250, bin::binary>>), do: {%PhoneCallDiscardReasonBusy{}, bin} | |
def decode(bin), do: {%Unknown{}, bin} | |
# Functions | |
def req_pq(nonce), do: <<120, 151, 70, 96, encode(:Int128, nonce)::binary>> | |
def req_dh_params(nonce, server_nonce, p, q, public_key_fingerprint, encrypted_data), do: <<190, 228, 18, 215, encode(:Int128, nonce)::binary, encode(:Int128, server_nonce)::binary, encode(:String, p)::binary, encode(:String, q)::binary, encode(:Long, public_key_fingerprint)::binary, encode(:String, encrypted_data)::binary>> | |
def set_client_dh_params(nonce, server_nonce, encrypted_data), do: <<31, 95, 4, 245, encode(:Int128, nonce)::binary, encode(:Int128, server_nonce)::binary, encode(:String, encrypted_data)::binary>> | |
def rpc_drop_answer(req_msg_id), do: <<64, 167, 228, 88, encode(:Long, req_msg_id)::binary>> | |
def get_future_salts(num), do: <<4, 189, 33, 185, encode(:Int, num)::binary>> | |
def ping(ping_id), do: <<236, 119, 190, 122, encode(:Long, ping_id)::binary>> | |
def ping_delay_disconnect(ping_id, disconnect_delay), do: <<140, 123, 66, 243, encode(:Long, ping_id)::binary, encode(:Int, disconnect_delay)::binary>> | |
def destroy_session(session_id), do: <<38, 33, 81, 231, encode(:Long, session_id)::binary>> | |
def contest_savedeveloperinfo(vk_id, name, phone_number, age, city), do: <<149, 110, 95, 154, encode(:Int, vk_id)::binary, encode(:String, name)::binary, encode(:String, phone_number)::binary, encode(:Int, age)::binary, encode(:String, city)::binary>> | |
def invokeaftermsg(msg_id, query), do: <<45, 55, 159, 203, encode(:Long, msg_id)::binary, query::binary>> | |
def invokeaftermsgs(msg_ids, query), do: <<240, 180, 196, 61, enc_v(:Long, msg_ids)::binary, query::binary>> | |
def initconnection(api_id, device_model, system_version, app_version, lang_code, query), do: <<233, 109, 121, 105, encode(:Int, api_id)::binary, encode(:String, device_model)::binary, encode(:String, system_version)::binary, encode(:String, app_version)::binary, encode(:String, lang_code)::binary, query::binary>> | |
def invokewithlayer(layer, query), do: <<13, 13, 155, 218, encode(:Int, layer)::binary, query::binary>> | |
def invokewithoutupdates(query), do: <<183, 89, 148, 191, query::binary>> | |
def auth_checkphone(phone_number), do: <<251, 29, 229, 111, encode(:String, phone_number)::binary>> | |
def auth_sendcode(flags, allow_flashcall, phone_number, current_number, api_id, api_hash), do: <<236, 240, 174, 134, flags::little-4*8, enc_f(:True, allow_flashcall, flags, 1)::binary, encode(:String, phone_number)::binary, enc_f(current_number, flags, 1)::binary, encode(:Int, api_id)::binary, encode(:String, api_hash)::binary>> | |
def auth_signup(phone_number, phone_code_hash, phone_code, first_name, last_name), do: <<52, 118, 6, 27, encode(:String, phone_number)::binary, encode(:String, phone_code_hash)::binary, encode(:String, phone_code)::binary, encode(:String, first_name)::binary, encode(:String, last_name)::binary>> | |
def auth_signin(phone_number, phone_code_hash, phone_code), do: <<129, 21, 213, 188, encode(:String, phone_number)::binary, encode(:String, phone_code_hash)::binary, encode(:String, phone_code)::binary>> | |
def auth_logout, do: <<64, 218, 23, 87>> | |
def auth_resetauthorizations, do: <<26, 13, 171, 159>> | |
def auth_sendinvites(phone_numbers, message), do: <<151, 29, 28, 119, enc_v(:String, phone_numbers)::binary, encode(:String, message)::binary>> | |
def auth_exportauthorization(dc_id), do: <<205, 255, 191, 229, encode(:Int, dc_id)::binary>> | |
def auth_importauthorization(id, bytes), do: <<19, 150, 239, 227, encode(:Int, id)::binary, encode(:Bytes, bytes)::binary>> | |
def auth_bindtempauthkey(perm_auth_key_id, nonce, expires_at, encrypted_message), do: <<5, 42, 212, 205, encode(:Long, perm_auth_key_id)::binary, encode(:Long, nonce)::binary, encode(:Int, expires_at)::binary, encode(:Bytes, encrypted_message)::binary>> | |
def auth_importbotauthorization(flags, api_id, api_hash, bot_auth_token), do: <<44, 255, 163, 103, flags::little-4*8, encode(:Int, api_id)::binary, encode(:String, api_hash)::binary, encode(:String, bot_auth_token)::binary>> | |
def auth_checkpassword(password_hash), do: <<30, 1, 99, 10, encode(:Bytes, password_hash)::binary>> | |
def auth_requestpasswordrecovery, do: <<102, 188, 151, 216>> | |
def auth_recoverpassword(code), do: <<146, 110, 165, 78, encode(:String, code)::binary>> | |
def auth_resendcode(phone_number, phone_code_hash), do: <<191, 169, 241, 62, encode(:String, phone_number)::binary, encode(:String, phone_code_hash)::binary>> | |
def auth_cancelcode(phone_number, phone_code_hash), do: <<120, 5, 4, 31, encode(:String, phone_number)::binary, encode(:String, phone_code_hash)::binary>> | |
def auth_droptempauthkeys(except_auth_keys), do: <<136, 161, 72, 142, enc_v(:Long, except_auth_keys)::binary>> | |
def account_registerdevice(token_type, token), do: <<120, 168, 126, 99, encode(:Int, token_type)::binary, encode(:String, token)::binary>> | |
def account_unregisterdevice(token_type, token), do: <<64, 91, 197, 101, encode(:Int, token_type)::binary, encode(:String, token)::binary>> | |
def account_updatenotifysettings(peer, settings), do: <<147, 91, 190, 132, encode(peer)::binary, encode(settings)::binary>> | |
def account_getnotifysettings(peer), do: <<49, 173, 179, 18, encode(peer)::binary>> | |
def account_resetnotifysettings, do: <<71, 23, 126, 219>> | |
def account_updateprofile(flags, first_name, last_name, about), do: <<117, 87, 81, 120, flags::little-4*8, enc_f(:String, first_name, flags, 1)::binary, enc_f(:String, last_name, flags, 2)::binary, enc_f(:String, about, flags, 4)::binary>> | |
def account_updatestatus(offline), do: <<44, 86, 40, 102, encode(offline)::binary>> | |
def account_getwallpapers, do: <<194, 250, 76, 192>> | |
def account_reportpeer(peer, reason), do: <<95, 157, 24, 174, encode(peer)::binary, encode(reason)::binary>> | |
def account_checkusername(username), do: <<108, 216, 20, 39, encode(:String, username)::binary>> | |
def account_updateusername(username), do: <<124, 221, 11, 62, encode(:String, username)::binary>> | |
def account_getprivacy(key), do: <<80, 201, 219, 218, encode(key)::binary>> | |
def account_setprivacy(key, rules), do: <<232, 28, 248, 201, encode(key)::binary, enc_v(rules)::binary>> | |
def account_deleteaccount(reason), do: <<11, 78, 141, 65, encode(:String, reason)::binary>> | |
def account_getaccountttl, do: <<29, 113, 252, 8>> | |
def account_setaccountttl(ttl), do: <<94, 72, 66, 36, encode(ttl)::binary>> | |
def account_sendchangephonecode(flags, allow_flashcall, phone_number, current_number), do: <<235, 125, 229, 8, flags::little-4*8, enc_f(:True, allow_flashcall, flags, 1)::binary, encode(:String, phone_number)::binary, enc_f(current_number, flags, 1)::binary>> | |
def account_changephone(phone_number, phone_code_hash, phone_code), do: <<219, 46, 195, 112, encode(:String, phone_number)::binary, encode(:String, phone_code_hash)::binary, encode(:String, phone_code)::binary>> | |
def account_updatedevicelocked(period), do: <<50, 53, 223, 56, encode(:Int, period)::binary>> | |
def account_getauthorizations, do: <<88, 193, 32, 227>> | |
def account_resetauthorization(hash), do: <<188, 243, 119, 223, encode(:Long, hash)::binary>> | |
def account_getpassword, do: <<245, 48, 138, 84>> | |
def account_getpasswordsettings(current_password_hash), do: <<187, 17, 141, 188, encode(:Bytes, current_password_hash)::binary>> | |
def account_updatepasswordsettings(current_password_hash, new_settings), do: <<134, 75, 124, 250, encode(:Bytes, current_password_hash)::binary, encode(new_settings)::binary>> | |
def account_sendconfirmphonecode(flags, allow_flashcall, hash, current_number), do: <<189, 215, 22, 21, flags::little-4*8, enc_f(:True, allow_flashcall, flags, 1)::binary, encode(:String, hash)::binary, enc_f(current_number, flags, 1)::binary>> | |
def account_confirmphone(phone_code_hash, phone_code), do: <<195, 120, 33, 95, encode(:String, phone_code_hash)::binary, encode(:String, phone_code)::binary>> | |
def users_getusers(id), do: <<72, 165, 145, 13, enc_v(id)::binary>> | |
def users_getfulluser(id), do: <<177, 165, 48, 202, encode(id)::binary>> | |
def contacts_getstatuses, do: <<238, 83, 163, 196>> | |
def contacts_getcontacts(hash), do: <<8, 170, 198, 34, encode(:String, hash)::binary>> | |
def contacts_importcontacts(contacts, replace), do: <<45, 179, 48, 218, enc_v(contacts)::binary, encode(replace)::binary>> | |
def contacts_deletecontact(id), do: <<68, 55, 149, 142, encode(id)::binary>> | |
def contacts_deletecontacts(id), do: <<158, 56, 171, 89, enc_v(id)::binary>> | |
def contacts_block(id), do: <<252, 73, 43, 51, encode(id)::binary>> | |
def contacts_unblock(id), do: <<189, 0, 65, 229, encode(id)::binary>> | |
def contacts_getblocked(offset, limit), do: <<15, 53, 124, 245, encode(:Int, offset)::binary, encode(:Int, limit)::binary>> | |
def contacts_exportcard, do: <<55, 55, 229, 132>> | |
def contacts_importcard(export_card), do: <<254, 150, 225, 79, enc_v(:Int, export_card)::binary>> | |
def contacts_search(q, limit), do: <<216, 18, 248, 17, encode(:String, q)::binary, encode(:Int, limit)::binary>> | |
def contacts_resolveusername(username), do: <<163, 203, 60, 249, encode(:String, username)::binary>> | |
def contacts_gettoppeers(flags, correspondents, bots_pm, bots_inline, groups, channels, offset, limit, hash), do: <<181, 45, 152, 212, flags::little-4*8, enc_f(:True, correspondents, flags, 1)::binary, enc_f(:True, bots_pm, flags, 2)::binary, enc_f(:True, bots_inline, flags, 4)::binary, enc_f(:True, groups, flags, 1024)::binary, enc_f(:True, channels, flags, 32768)::binary, encode(:Int, offset)::binary, encode(:Int, limit)::binary, encode(:Int, hash)::binary>> | |
def contacts_resettoppeerrating(category, peer), do: <<172, 115, 227, 26, encode(category)::binary, encode(peer)::binary>> | |
def messages_getmessages(id), do: <<116, 250, 34, 66, enc_v(:Int, id)::binary>> | |
def messages_getdialogs(flags, exclude_pinned, offset_date, offset_id, offset_peer, limit), do: <<197, 169, 27, 25, flags::little-4*8, enc_f(:True, exclude_pinned, flags, 1)::binary, encode(:Int, offset_date)::binary, encode(:Int, offset_id)::binary, encode(offset_peer)::binary, encode(:Int, limit)::binary>> | |
def messages_gethistory(peer, offset_id, offset_date, add_offset, limit, max_id, min_id), do: <<70, 40, 169, 175, encode(peer)::binary, encode(:Int, offset_id)::binary, encode(:Int, offset_date)::binary, encode(:Int, add_offset)::binary, encode(:Int, limit)::binary, encode(:Int, max_id)::binary, encode(:Int, min_id)::binary>> | |
def messages_search(flags, peer, q, filter, min_date, max_date, offset, max_id, limit), do: <<72, 146, 86, 212, flags::little-4*8, encode(peer)::binary, encode(:String, q)::binary, encode(filter)::binary, encode(:Int, min_date)::binary, encode(:Int, max_date)::binary, encode(:Int, offset)::binary, encode(:Int, max_id)::binary, encode(:Int, limit)::binary>> | |
def messages_readhistory(peer, max_id), do: <<58, 109, 48, 14, encode(peer)::binary, encode(:Int, max_id)::binary>> | |
def messages_deletehistory(flags, just_clear, peer, max_id), do: <<9, 91, 1, 28, flags::little-4*8, enc_f(:True, just_clear, flags, 1)::binary, encode(peer)::binary, encode(:Int, max_id)::binary>> | |
def messages_deletemessages(flags, revoke, id), do: <<210, 149, 142, 229, flags::little-4*8, enc_f(:True, revoke, flags, 1)::binary, enc_v(:Int, id)::binary>> | |
def messages_receivedmessages(max_id), do: <<192, 84, 169, 5, encode(:Int, max_id)::binary>> | |
def messages_settyping(peer, action), do: <<80, 94, 130, 163, encode(peer)::binary, encode(action)::binary>> | |
def messages_sendmessage(flags, no_webpage, silent, background, clear_draft, peer, reply_to_msg_id, message, random_id, reply_markup, entities), do: <<122, 66, 136, 250, flags::little-4*8, enc_f(:True, no_webpage, flags, 2)::binary, enc_f(:True, silent, flags, 32)::binary, enc_f(:True, background, flags, 64)::binary, enc_f(:True, clear_draft, flags, 128)::binary, encode(peer)::binary, enc_f(:Int, reply_to_msg_id, flags, 1)::binary, encode(:String, message)::binary, encode(:Long, random_id)::binary, enc_f(reply_markup, flags, 4)::binary, enc_vf(entities, flags, 8)::binary>> | |
def messages_sendmedia(flags, silent, background, clear_draft, peer, reply_to_msg_id, media, random_id, reply_markup), do: <<145, 103, 241, 200, flags::little-4*8, enc_f(:True, silent, flags, 32)::binary, enc_f(:True, background, flags, 64)::binary, enc_f(:True, clear_draft, flags, 128)::binary, encode(peer)::binary, enc_f(:Int, reply_to_msg_id, flags, 1)::binary, encode(media)::binary, encode(:Long, random_id)::binary, enc_f(reply_markup, flags, 4)::binary>> | |
def messages_forwardmessages(flags, silent, background, with_my_score, from_peer, id, random_id, to_peer), do: <<149, 1, 142, 112, flags::little-4*8, enc_f(:True, silent, flags, 32)::binary, enc_f(:True, background, flags, 64)::binary, enc_f(:True, with_my_score, flags, 256)::binary, encode(from_peer)::binary, enc_v(:Int, id)::binary, enc_v(:Long, random_id)::binary, encode(to_peer)::binary>> | |
def messages_reportspam(peer), do: <<219, 146, 21, 207, encode(peer)::binary>> | |
def messages_hidereportspam(peer), do: <<155, 112, 241, 168, encode(peer)::binary>> | |
def messages_getpeersettings(peer), do: <<156, 224, 114, 54, encode(peer)::binary>> | |
def messages_getchats(id), do: <<135, 161, 106, 60, enc_v(:Int, id)::binary>> | |
def messages_getfullchat(chat_id), do: <<102, 28, 131, 59, encode(:Int, chat_id)::binary>> | |
def messages_editchattitle(chat_id, title), do: <<85, 40, 69, 220, encode(:Int, chat_id)::binary, encode(:String, title)::binary>> | |
def messages_editchatphoto(chat_id, photo), do: <<216, 121, 76, 202, encode(:Int, chat_id)::binary, encode(photo)::binary>> | |
def messages_addchatuser(chat_id, user_id, fwd_limit), do: <<9, 170, 160, 249, encode(:Int, chat_id)::binary, encode(user_id)::binary, encode(:Int, fwd_limit)::binary>> | |
def messages_deletechatuser(chat_id, user_id), do: <<22, 31, 97, 224, encode(:Int, chat_id)::binary, encode(user_id)::binary>> | |
def messages_createchat(users, title), do: <<110, 18, 203, 9, enc_v(users)::binary, encode(:String, title)::binary>> | |
def messages_forwardmessage(peer, id, random_id), do: <<249, 59, 150, 51, encode(peer)::binary, encode(:Int, id)::binary, encode(:Long, random_id)::binary>> | |
def messages_getdhconfig(version, random_length), do: <<80, 137, 207, 38, encode(:Int, version)::binary, encode(:Int, random_length)::binary>> | |
def messages_requestencryption(user_id, random_id, g_a), do: <<67, 175, 77, 246, encode(user_id)::binary, encode(:Int, random_id)::binary, encode(:Bytes, g_a)::binary>> | |
def messages_acceptencryption(peer, g_b, key_fingerprint), do: <<21, 4, 188, 61, encode(peer)::binary, encode(:Bytes, g_b)::binary, encode(:Long, key_fingerprint)::binary>> | |
def messages_discardencryption(chat_id), do: <<197, 35, 217, 237, encode(:Int, chat_id)::binary>> | |
def messages_setencryptedtyping(peer, typing), do: <<237, 81, 20, 121, encode(peer)::binary, encode(typing)::binary>> | |
def messages_readencryptedhistory(peer, max_date), do: <<10, 105, 75, 127, encode(peer)::binary, encode(:Int, max_date)::binary>> | |
def messages_sendencrypted(peer, random_id, data), do: <<115, 103, 119, 169, encode(peer)::binary, encode(:Long, random_id)::binary, encode(:Bytes, data)::binary>> | |
def messages_sendencryptedfile(peer, random_id, data, file), do: <<102, 27, 144, 154, encode(peer)::binary, encode(:Long, random_id)::binary, encode(:Bytes, data)::binary, encode(file)::binary>> | |
def messages_sendencryptedservice(peer, random_id, data), do: <<164, 57, 212, 50, encode(peer)::binary, encode(:Long, random_id)::binary, encode(:Bytes, data)::binary>> | |
def messages_receivedqueue(max_qts), do: <<102, 187, 165, 85, encode(:Int, max_qts)::binary>> | |
def messages_reportencryptedspam(peer), do: <<15, 140, 12, 75, encode(peer)::binary>> | |
def messages_readmessagecontents(id), do: <<119, 63, 167, 54, enc_v(:Int, id)::binary>> | |
def messages_getallstickers(hash), do: <<177, 24, 150, 28, encode(:Int, hash)::binary>> | |
def messages_getwebpagepreview(message), do: <<36, 62, 34, 37, encode(:String, message)::binary>> | |
def messages_exportchatinvite(chat_id), do: <<137, 82, 136, 125, encode(:Int, chat_id)::binary>> | |
def messages_checkchatinvite(hash), do: <<187, 177, 173, 62, encode(:String, hash)::binary>> | |
def messages_importchatinvite(hash), do: <<28, 5, 80, 108, encode(:String, hash)::binary>> | |
def messages_getstickerset(stickerset), do: <<14, 169, 25, 38, encode(stickerset)::binary>> | |
def messages_installstickerset(stickerset, archived), do: <<96, 228, 143, 199, encode(stickerset)::binary, encode(archived)::binary>> | |
def messages_uninstallstickerset(stickerset), do: <<222, 85, 110, 249, encode(stickerset)::binary>> | |
def messages_startbot(bot, peer, random_id, start_param), do: <<120, 115, 223, 230, encode(bot)::binary, encode(peer)::binary, encode(:Long, random_id)::binary, encode(:String, start_param)::binary>> | |
def messages_getmessagesviews(peer, id, increment), do: <<93, 165, 200, 196, encode(peer)::binary, enc_v(:Int, id)::binary, encode(increment)::binary>> | |
def messages_togglechatadmins(chat_id, enabled), do: <<225, 217, 139, 236, encode(:Int, chat_id)::binary, encode(enabled)::binary>> | |
def messages_editchatadmin(chat_id, user_id, is_admin), do: <<46, 159, 230, 169, encode(:Int, chat_id)::binary, encode(user_id)::binary, encode(is_admin)::binary>> | |
def messages_migratechat(chat_id), do: <<227, 184, 163, 21, encode(:Int, chat_id)::binary>> | |
def messages_searchglobal(q, offset_date, offset_peer, offset_id, limit), do: <<176, 172, 60, 158, encode(:String, q)::binary, encode(:Int, offset_date)::binary, encode(offset_peer)::binary, encode(:Int, offset_id)::binary, encode(:Int, limit)::binary>> | |
def messages_reorderstickersets(flags, masks, order), do: <<57, 119, 51, 120, flags::little-4*8, enc_f(:True, masks, flags, 1)::binary, enc_v(:Long, order)::binary>> | |
def messages_getdocumentbyhash(sha256, size, mime_type), do: <<100, 36, 142, 51, encode(:Bytes, sha256)::binary, encode(:Int, size)::binary, encode(:String, mime_type)::binary>> | |
def messages_searchgifs(q, offset), do: <<107, 119, 154, 191, encode(:String, q)::binary, encode(:Int, offset)::binary>> | |
def messages_getsavedgifs(hash), do: <<82, 61, 191, 131, encode(:Int, hash)::binary>> | |
def messages_savegif(id, unsave), do: <<203, 48, 122, 50, encode(id)::binary, encode(unsave)::binary>> | |
def messages_getinlinebotresults(flags, bot, peer, geo_point, query, offset), do: <<157, 153, 78, 81, flags::little-4*8, encode(bot)::binary, encode(peer)::binary, enc_f(geo_point, flags, 1)::binary, encode(:String, query)::binary, encode(:String, offset)::binary>> | |
def messages_setinlinebotresults(flags, gallery, private, query_id, results, cache_time, next_offset, switch_pm), do: <<6, 162, 94, 235, flags::little-4*8, enc_f(:True, gallery, flags, 1)::binary, enc_f(:True, private, flags, 2)::binary, encode(:Long, query_id)::binary, enc_v(results)::binary, encode(:Int, cache_time)::binary, enc_f(:String, next_offset, flags, 4)::binary, enc_f(switch_pm, flags, 8)::binary>> | |
def messages_sendinlinebotresult(flags, silent, background, clear_draft, peer, reply_to_msg_id, random_id, query_id, id), do: <<254, 6, 110, 177, flags::little-4*8, enc_f(:True, silent, flags, 32)::binary, enc_f(:True, background, flags, 64)::binary, enc_f(:True, clear_draft, flags, 128)::binary, encode(peer)::binary, enc_f(:Int, reply_to_msg_id, flags, 1)::binary, encode(:Long, random_id)::binary, encode(:Long, query_id)::binary, encode(:String, id)::binary>> | |
def messages_getmessageeditdata(peer, id), do: <<54, 141, 166, 253, encode(peer)::binary, encode(:Int, id)::binary>> | |
def messages_editmessage(flags, no_webpage, peer, id, message, reply_markup, entities), do: <<202, 228, 145, 206, flags::little-4*8, enc_f(:True, no_webpage, flags, 2)::binary, encode(peer)::binary, encode(:Int, id)::binary, enc_f(:String, message, flags, 2048)::binary, enc_f(reply_markup, flags, 4)::binary, enc_vf(entities, flags, 8)::binary>> | |
def messages_editinlinebotmessage(flags, no_webpage, id, message, reply_markup, entities), do: <<133, 44, 12, 19, flags::little-4*8, enc_f(:True, no_webpage, flags, 2)::binary, encode(id)::binary, enc_f(:String, message, flags, 2048)::binary, enc_f(reply_markup, flags, 4)::binary, enc_vf(entities, flags, 8)::binary>> | |
def messages_getbotcallbackanswer(flags, game, peer, msg_id, data), do: <<236, 159, 10, 129, flags::little-4*8, enc_f(:True, game, flags, 2)::binary, encode(peer)::binary, encode(:Int, msg_id)::binary, enc_f(:Bytes, data, flags, 1)::binary>> | |
def messages_setbotcallbackanswer(flags, alert, query_id, message, url, cache_time), do: <<10, 19, 143, 213, flags::little-4*8, enc_f(:True, alert, flags, 2)::binary, encode(:Long, query_id)::binary, enc_f(:String, message, flags, 1)::binary, enc_f(:String, url, flags, 4)::binary, encode(:Int, cache_time)::binary>> | |
def messages_getpeerdialogs(peers), do: <<185, 118, 151, 45, enc_v(peers)::binary>> | |
def messages_savedraft(flags, no_webpage, reply_to_msg_id, peer, message, entities), do: <<75, 225, 57, 188, flags::little-4*8, enc_f(:True, no_webpage, flags, 2)::binary, enc_f(:Int, reply_to_msg_id, flags, 1)::binary, encode(peer)::binary, encode(:String, message)::binary, enc_vf(entities, flags, 8)::binary>> | |
def messages_getalldrafts, do: <<101, 141, 63, 106>> | |
def messages_getfeaturedstickers(hash), do: <<79, 202, 172, 45, encode(:Int, hash)::binary>> | |
def messages_readfeaturedstickers(id), do: <<38, 129, 17, 91, enc_v(:Long, id)::binary>> | |
def messages_getrecentstickers(flags, attached, hash), do: <<201, 146, 161, 94, flags::little-4*8, enc_f(:True, attached, flags, 1)::binary, encode(:Int, hash)::binary>> | |
def messages_saverecentsticker(flags, attached, id, unsave), do: <<248, 24, 39, 57, flags::little-4*8, enc_f(:True, attached, flags, 1)::binary, encode(id)::binary, encode(unsave)::binary>> | |
def messages_clearrecentstickers(flags, attached), do: <<45, 96, 153, 137, flags::little-4*8, enc_f(:True, attached, flags, 1)::binary>> | |
def messages_getarchivedstickers(flags, masks, offset_id, limit), do: <<146, 118, 241, 87, flags::little-4*8, enc_f(:True, masks, flags, 1)::binary, encode(:Long, offset_id)::binary, encode(:Int, limit)::binary>> | |
def messages_getmaskstickers(hash), do: <<159, 199, 184, 101, encode(:Int, hash)::binary>> | |
def messages_getattachedstickers(media), do: <<204, 103, 91, 204, encode(media)::binary>> | |
def messages_setgamescore(flags, edit_message, force, peer, id, user_id, score), do: <<192, 236, 248, 142, flags::little-4*8, enc_f(:True, edit_message, flags, 1)::binary, enc_f(:True, force, flags, 2)::binary, encode(peer)::binary, encode(:Int, id)::binary, encode(user_id)::binary, encode(:Int, score)::binary>> | |
def messages_setinlinegamescore(flags, edit_message, force, id, user_id, score), do: <<100, 159, 173, 21, flags::little-4*8, enc_f(:True, edit_message, flags, 1)::binary, enc_f(:True, force, flags, 2)::binary, encode(id)::binary, encode(user_id)::binary, encode(:Int, score)::binary>> | |
def messages_getgamehighscores(peer, id, user_id), do: <<157, 100, 34, 232, encode(peer)::binary, encode(:Int, id)::binary, encode(user_id)::binary>> | |
def messages_getinlinegamehighscores(id, user_id), do: <<27, 94, 99, 15, encode(id)::binary, encode(user_id)::binary>> | |
def messages_getcommonchats(user_id, max_id, limit), do: <<196, 72, 10, 13, encode(user_id)::binary, encode(:Int, max_id)::binary, encode(:Int, limit)::binary>> | |
def messages_getallchats(except_ids), do: <<240, 15, 168, 235, enc_v(:Int, except_ids)::binary>> | |
def messages_getwebpage(url, hash), do: <<145, 143, 202, 50, encode(:String, url)::binary, encode(:Int, hash)::binary>> | |
def messages_toggledialogpin(flags, pinned, peer), do: <<106, 190, 137, 50, flags::little-4*8, enc_f(:True, pinned, flags, 1)::binary, encode(peer)::binary>> | |
def messages_reorderpinneddialogs(flags, force, order), do: <<68, 246, 159, 149, flags::little-4*8, enc_f(:True, force, flags, 1)::binary, enc_v(order)::binary>> | |
def messages_getpinneddialogs, do: <<78, 214, 84, 226>> | |
def updates_getstate, do: <<42, 136, 212, 237>> | |
def updates_getdifference(flags, pts, pts_total_limit, date, qts), do: <<81, 150, 147, 37, flags::little-4*8, encode(:Int, pts)::binary, enc_f(:Int, pts_total_limit, flags, 1)::binary, encode(:Int, date)::binary, encode(:Int, qts)::binary>> | |
def updates_getchanneldifference(flags, force, channel, filter, pts, limit), do: <<120, 61, 23, 3, flags::little-4*8, enc_f(:True, force, flags, 1)::binary, encode(channel)::binary, encode(filter)::binary, encode(:Int, pts)::binary, encode(:Int, limit)::binary>> | |
def photos_updateprofilephoto(id), do: <<82, 81, 187, 240, encode(id)::binary>> | |
def photos_uploadprofilephoto(file), do: <<152, 192, 50, 79, encode(file)::binary>> | |
def photos_deletephotos(id), do: <<47, 127, 207, 135, enc_v(id)::binary>> | |
def photos_getuserphotos(user_id, offset, max_id, limit), do: <<168, 50, 205, 145, encode(user_id)::binary, encode(:Int, offset)::binary, encode(:Long, max_id)::binary, encode(:Int, limit)::binary>> | |
def upload_savefilepart(file_id, file_part, bytes), do: <<33, 166, 4, 179, encode(:Long, file_id)::binary, encode(:Int, file_part)::binary, encode(:Bytes, bytes)::binary>> | |
def upload_getfile(location, offset, limit), do: <<181, 207, 166, 227, encode(location)::binary, encode(:Int, offset)::binary, encode(:Int, limit)::binary>> | |
def upload_savebigfilepart(file_id, file_part, file_total_parts, bytes), do: <<61, 103, 123, 222, encode(:Long, file_id)::binary, encode(:Int, file_part)::binary, encode(:Int, file_total_parts)::binary, encode(:Bytes, bytes)::binary>> | |
def help_getconfig, do: <<107, 24, 249, 196>> | |
def help_getnearestdc, do: <<38, 48, 179, 31>> | |
def help_getappupdate, do: <<150, 225, 45, 174>> | |
def help_saveapplog(events), do: <<72, 247, 2, 111, enc_v(events)::binary>> | |
def help_getinvitetext, do: <<67, 35, 57, 77>> | |
def help_getsupport, do: <<205, 8, 223, 156>> | |
def help_getappchangelog, do: <<122, 25, 33, 185>> | |
def help_gettermsofservice, do: <<243, 112, 1, 53>> | |
def help_setbotupdatesstatus(pending_updates_count, message), do: <<205, 207, 34, 236, encode(:Int, pending_updates_count)::binary, encode(:String, message)::binary>> | |
def channels_readhistory(channel, max_id), do: <<55, 73, 16, 204, encode(channel)::binary, encode(:Int, max_id)::binary>> | |
def channels_deletemessages(channel, id), do: <<78, 253, 193, 132, encode(channel)::binary, enc_v(:Int, id)::binary>> | |
def channels_deleteuserhistory(channel, user_id), do: <<27, 215, 13, 209, encode(channel)::binary, encode(user_id)::binary>> | |
def channels_reportspam(channel, user_id, id), do: <<16, 120, 8, 254, encode(channel)::binary, encode(user_id)::binary, enc_v(:Int, id)::binary>> | |
def channels_getmessages(channel, id), do: <<71, 179, 215, 147, encode(channel)::binary, enc_v(:Int, id)::binary>> | |
def channels_getparticipants(channel, filter, offset, limit), do: <<146, 143, 217, 36, encode(channel)::binary, encode(filter)::binary, encode(:Int, offset)::binary, encode(:Int, limit)::binary>> | |
def channels_getparticipant(channel, user_id), do: <<166, 215, 109, 84, encode(channel)::binary, encode(user_id)::binary>> | |
def channels_getchannels(id), do: <<187, 107, 127, 10, enc_v(id)::binary>> | |
def channels_getfullchannel(channel), do: <<9, 106, 115, 8, encode(channel)::binary>> | |
def channels_createchannel(flags, broadcast, megagroup, title, about), do: <<127, 61, 137, 244, flags::little-4*8, enc_f(:True, broadcast, flags, 1)::binary, enc_f(:True, megagroup, flags, 2)::binary, encode(:String, title)::binary, encode(:String, about)::binary>> | |
def channels_editabout(channel, about), do: <<30, 127, 226, 19, encode(channel)::binary, encode(:String, about)::binary>> | |
def channels_editadmin(channel, user_id, role), do: <<208, 17, 118, 235, encode(channel)::binary, encode(user_id)::binary, encode(role)::binary>> | |
def channels_edittitle(channel, title), do: <<208, 236, 109, 86, encode(channel)::binary, encode(:String, title)::binary>> | |
def channels_editphoto(channel, photo), do: <<201, 87, 46, 241, encode(channel)::binary, encode(photo)::binary>> | |
def channels_checkusername(channel, username), do: <<44, 189, 230, 16, encode(channel)::binary, encode(:String, username)::binary>> | |
def channels_updateusername(channel, username), do: <<222, 179, 20, 53, encode(channel)::binary, encode(:String, username)::binary>> | |
def channels_joinchannel(channel), do: <<197, 36, 181, 36, encode(channel)::binary>> | |
def channels_leavechannel(channel), do: <<149, 170, 54, 248, encode(channel)::binary>> | |
def channels_invitetochannel(channel, users), do: <<108, 58, 159, 25, encode(channel)::binary, enc_v(users)::binary>> | |
def channels_kickfromchannel(channel, user_id, kicked), do: <<20, 222, 114, 166, encode(channel)::binary, encode(user_id)::binary, encode(kicked)::binary>> | |
def channels_exportinvite(channel), do: <<133, 8, 86, 199, encode(channel)::binary>> | |
def channels_deletechannel(channel), do: <<227, 31, 17, 192, encode(channel)::binary>> | |
def channels_toggleinvites(channel, enabled), do: <<7, 147, 96, 73, encode(channel)::binary, encode(enabled)::binary>> | |
def channels_exportmessagelink(channel, id), do: <<45, 210, 70, 200, encode(channel)::binary, encode(:Int, id)::binary>> | |
def channels_togglesignatures(channel, enabled), do: <<6, 182, 105, 31, encode(channel)::binary, encode(enabled)::binary>> | |
def channels_updatepinnedmessage(flags, silent, channel, id), do: <<82, 237, 45, 167, flags::little-4*8, enc_f(:True, silent, flags, 1)::binary, encode(channel)::binary, encode(:Int, id)::binary>> | |
def channels_getadminedpublicchannels, do: <<215, 130, 141, 141>> | |
def phone_requestcall(user_id, random_id, g_a, protocol), do: <<228, 165, 26, 164, encode(user_id)::binary, encode(:Int, random_id)::binary, encode(:Bytes, g_a)::binary, encode(protocol)::binary>> | |
def phone_acceptcall(peer, g_b, key_fingerprint, protocol), do: <<32, 11, 15, 34, encode(peer)::binary, encode(:Bytes, g_b)::binary, encode(:Long, key_fingerprint)::binary, encode(protocol)::binary>> | |
def phone_discardcall(peer, duration, reason, connection_id), do: <<220, 205, 251, 93, encode(peer)::binary, encode(:Int, duration)::binary, encode(reason)::binary, encode(:Long, connection_id)::binary>> | |
def phone_receivedcall(peer), do: <<97, 79, 213, 23, encode(peer)::binary>> | |
# Type - heads | |
def head(<<0x05162463::little-4*8, _::binary>>), do: "ResPQ" | |
def head(<<0x83C95AEC::little-4*8, _::binary>>), do: "P_Q_Inner_Data" | |
def head(<<0x79CB045D::little-4*8, _::binary>>), do: "Server_DH_Params_Fail" | |
def head(<<0xD0E8075C::little-4*8, _::binary>>), do: "Server_DH_Params_Ok" | |
def head(<<0xB5890DBA::little-4*8, _::binary>>), do: "Server_DH_Inner_Data" | |
def head(<<0x6643B654::little-4*8, _::binary>>), do: "Client_DH_Inner_Data" | |
def head(<<0x3BCBF734::little-4*8, _::binary>>), do: "Dh_Gen_Ok" | |
def head(<<0x46DC1FB9::little-4*8, _::binary>>), do: "Dh_Gen_Retry" | |
def head(<<0xA69DAE02::little-4*8, _::binary>>), do: "Dh_Gen_Fail" | |
def head(<<0x62D6B459::little-4*8, _::binary>>), do: "Msgs_Ack" | |
def head(<<0xA7EFF811::little-4*8, _::binary>>), do: "Bad_Msg_Notification" | |
def head(<<0xEDAB447B::little-4*8, _::binary>>), do: "Bad_Server_Salt" | |
def head(<<0xDA69FB52::little-4*8, _::binary>>), do: "Msgs_State_Req" | |
def head(<<0x04DEB57D::little-4*8, _::binary>>), do: "Msgs_State_Info" | |
def head(<<0x8CC0D131::little-4*8, _::binary>>), do: "Msgs_All_Info" | |
def head(<<0x276D3EC6::little-4*8, _::binary>>), do: "Msg_Detailed_Info" | |
def head(<<0x809DB6DF::little-4*8, _::binary>>), do: "Msg_New_Detailed_Info" | |
def head(<<0x7D861A08::little-4*8, _::binary>>), do: "Msg_Resend_Req" | |
def head(<<0xF35C6D01::little-4*8, _::binary>>), do: "Rpc_Result" | |
def head(<<0x2144CA19::little-4*8, _::binary>>), do: "Rpc_Error" | |
def head(<<0x5E2AD36E::little-4*8, _::binary>>), do: "Rpc_Answer_Unknown" | |
def head(<<0xCD78E586::little-4*8, _::binary>>), do: "Rpc_Answer_Dropped_Running" | |
def head(<<0xA43AD8B7::little-4*8, _::binary>>), do: "Rpc_Answer_Dropped" | |
def head(<<0x0949D9DC::little-4*8, _::binary>>), do: "Future_Salt" | |
def head(<<0xAE500895::little-4*8, _::binary>>), do: "Future_Salts" | |
def head(<<0x347773C5::little-4*8, _::binary>>), do: "Pong" | |
def head(<<0xE22045FC::little-4*8, _::binary>>), do: "Destroy_Session_Ok" | |
def head(<<0x62D350C9::little-4*8, _::binary>>), do: "Destroy_Session_None" | |
def head(<<0x9EC20908::little-4*8, _::binary>>), do: "New_Session_Created" | |
def head(<<0x3072CFA1::little-4*8, _::binary>>), do: "Gzip_Packed" | |
def head(<<0x9299359F::little-4*8, _::binary>>), do: "Http_Wait" | |
def head(<<0xBC799737::little-4*8, _::binary>>), do: "BoolFalse" | |
def head(<<0x997275B5::little-4*8, _::binary>>), do: "BoolTrue" | |
def head(<<0x3FEDD339::little-4*8, _::binary>>), do: "True" | |
def head(<<0xC4B9F9BB::little-4*8, _::binary>>), do: "Error" | |
def head(<<0x56730BCC::little-4*8, _::binary>>), do: "Null" | |
def head(<<0x7F3B18EA::little-4*8, _::binary>>), do: "InputPeerEmpty" | |
def head(<<0x7DA07EC9::little-4*8, _::binary>>), do: "InputPeerSelf" | |
def head(<<0x179BE863::little-4*8, _::binary>>), do: "InputPeerChat" | |
def head(<<0x7B8E7DE6::little-4*8, _::binary>>), do: "InputPeerUser" | |
def head(<<0x20ADAEF8::little-4*8, _::binary>>), do: "InputPeerChannel" | |
def head(<<0xB98886CF::little-4*8, _::binary>>), do: "InputUserEmpty" | |
def head(<<0xF7C1B13F::little-4*8, _::binary>>), do: "InputUserSelf" | |
def head(<<0xD8292816::little-4*8, _::binary>>), do: "InputUser" | |
def head(<<0xF392B7F4::little-4*8, _::binary>>), do: "InputPhoneContact" | |
def head(<<0xF52FF27F::little-4*8, _::binary>>), do: "InputFile" | |
def head(<<0xFA4F0BB5::little-4*8, _::binary>>), do: "InputFileBig" | |
def head(<<0x9664F57F::little-4*8, _::binary>>), do: "InputMediaEmpty" | |
def head(<<0x630C9AF1::little-4*8, _::binary>>), do: "InputMediaUploadedPhoto" | |
def head(<<0xE9BFB4F3::little-4*8, _::binary>>), do: "InputMediaPhoto" | |
def head(<<0xF9C44144::little-4*8, _::binary>>), do: "InputMediaGeoPoint" | |
def head(<<0xA6E45987::little-4*8, _::binary>>), do: "InputMediaContact" | |
def head(<<0xD070F1E9::little-4*8, _::binary>>), do: "InputMediaUploadedDocument" | |
def head(<<0x50D88CAE::little-4*8, _::binary>>), do: "InputMediaUploadedThumbDocument" | |
def head(<<0x1A77F29C::little-4*8, _::binary>>), do: "InputMediaDocument" | |
def head(<<0x2827A81A::little-4*8, _::binary>>), do: "InputMediaVenue" | |
def head(<<0x4843B0FD::little-4*8, _::binary>>), do: "InputMediaGifExternal" | |
def head(<<0xB55F4F18::little-4*8, _::binary>>), do: "InputMediaPhotoExternal" | |
def head(<<0xE5E9607C::little-4*8, _::binary>>), do: "InputMediaDocumentExternal" | |
def head(<<0xD33F43F3::little-4*8, _::binary>>), do: "InputMediaGame" | |
def head(<<0x1CA48F57::little-4*8, _::binary>>), do: "InputChatPhotoEmpty" | |
def head(<<0x927C55B4::little-4*8, _::binary>>), do: "InputChatUploadedPhoto" | |
def head(<<0x8953AD37::little-4*8, _::binary>>), do: "InputChatPhoto" | |
def head(<<0xE4C123D6::little-4*8, _::binary>>), do: "InputGeoPointEmpty" | |
def head(<<0xF3B7ACC9::little-4*8, _::binary>>), do: "InputGeoPoint" | |
def head(<<0x1CD7BF0D::little-4*8, _::binary>>), do: "InputPhotoEmpty" | |
def head(<<0xFB95C6C4::little-4*8, _::binary>>), do: "InputPhoto" | |
def head(<<0x14637196::little-4*8, _::binary>>), do: "InputFileLocation" | |
def head(<<0xF5235D55::little-4*8, _::binary>>), do: "InputEncryptedFileLocation" | |
def head(<<0x430F0724::little-4*8, _::binary>>), do: "InputDocumentFileLocation" | |
def head(<<0x770656A8::little-4*8, _::binary>>), do: "InputAppEvent" | |
def head(<<0x9DB1BC6D::little-4*8, _::binary>>), do: "PeerUser" | |
def head(<<0xBAD0E5BB::little-4*8, _::binary>>), do: "PeerChat" | |
def head(<<0xBDDDE532::little-4*8, _::binary>>), do: "PeerChannel" | |
def head(<<0xAA963B05::little-4*8, _::binary>>), do: "Storage.FileUnknown" | |
def head(<<0x007EFE0E::little-4*8, _::binary>>), do: "Storage.FileJpeg" | |
def head(<<0xCAE1AADF::little-4*8, _::binary>>), do: "Storage.FileGif" | |
def head(<<0x0A4F63C0::little-4*8, _::binary>>), do: "Storage.FilePng" | |
def head(<<0xAE1E508D::little-4*8, _::binary>>), do: "Storage.FilePdf" | |
def head(<<0x528A0677::little-4*8, _::binary>>), do: "Storage.FileMp3" | |
def head(<<0x4B09EBBC::little-4*8, _::binary>>), do: "Storage.FileMov" | |
def head(<<0x40BC6F52::little-4*8, _::binary>>), do: "Storage.FilePartial" | |
def head(<<0xB3CEA0E4::little-4*8, _::binary>>), do: "Storage.FileMp4" | |
def head(<<0x1081464C::little-4*8, _::binary>>), do: "Storage.FileWebp" | |
def head(<<0x7C596B46::little-4*8, _::binary>>), do: "FileLocationUnavailable" | |
def head(<<0x53D69076::little-4*8, _::binary>>), do: "FileLocation" | |
def head(<<0x200250BA::little-4*8, _::binary>>), do: "UserEmpty" | |
def head(<<0xD10D979A::little-4*8, _::binary>>), do: "User" | |
def head(<<0x4F11BAE1::little-4*8, _::binary>>), do: "UserProfilePhotoEmpty" | |
def head(<<0xD559D8C8::little-4*8, _::binary>>), do: "UserProfilePhoto" | |
def head(<<0x09D05049::little-4*8, _::binary>>), do: "UserStatusEmpty" | |
def head(<<0xEDB93949::little-4*8, _::binary>>), do: "UserStatusOnline" | |
def head(<<0x008C703F::little-4*8, _::binary>>), do: "UserStatusOffline" | |
def head(<<0xE26F42F1::little-4*8, _::binary>>), do: "UserStatusRecently" | |
def head(<<0x07BF09FC::little-4*8, _::binary>>), do: "UserStatusLastWeek" | |
def head(<<0x77EBC742::little-4*8, _::binary>>), do: "UserStatusLastMonth" | |
def head(<<0x9BA2D800::little-4*8, _::binary>>), do: "ChatEmpty" | |
def head(<<0xD91CDD54::little-4*8, _::binary>>), do: "Chat" | |
def head(<<0x07328BDB::little-4*8, _::binary>>), do: "ChatForbidden" | |
def head(<<0xA14DCA52::little-4*8, _::binary>>), do: "Channel" | |
def head(<<0x8537784F::little-4*8, _::binary>>), do: "ChannelForbidden" | |
def head(<<0x2E02A614::little-4*8, _::binary>>), do: "ChatFull" | |
def head(<<0xC3D5512F::little-4*8, _::binary>>), do: "ChannelFull" | |
def head(<<0xC8D7493E::little-4*8, _::binary>>), do: "ChatParticipant" | |
def head(<<0xDA13538A::little-4*8, _::binary>>), do: "ChatParticipantCreator" | |
def head(<<0xE2D6E436::little-4*8, _::binary>>), do: "ChatParticipantAdmin" | |
def head(<<0xFC900C2B::little-4*8, _::binary>>), do: "ChatParticipantsForbidden" | |
def head(<<0x3F460FED::little-4*8, _::binary>>), do: "ChatParticipants" | |
def head(<<0x37C1011C::little-4*8, _::binary>>), do: "ChatPhotoEmpty" | |
def head(<<0x6153276A::little-4*8, _::binary>>), do: "ChatPhoto" | |
def head(<<0x83E5DE54::little-4*8, _::binary>>), do: "MessageEmpty" | |
def head(<<0xC09BE45F::little-4*8, _::binary>>), do: "Message" | |
def head(<<0x9E19A1F6::little-4*8, _::binary>>), do: "MessageService" | |
def head(<<0x3DED6320::little-4*8, _::binary>>), do: "MessageMediaEmpty" | |
def head(<<0x3D8CE53D::little-4*8, _::binary>>), do: "MessageMediaPhoto" | |
def head(<<0x56E0D474::little-4*8, _::binary>>), do: "MessageMediaGeo" | |
def head(<<0x5E7D2F39::little-4*8, _::binary>>), do: "MessageMediaContact" | |
def head(<<0x9F84F49E::little-4*8, _::binary>>), do: "MessageMediaUnsupported" | |
def head(<<0xF3E02EA8::little-4*8, _::binary>>), do: "MessageMediaDocument" | |
def head(<<0xA32DD600::little-4*8, _::binary>>), do: "MessageMediaWebPage" | |
def head(<<0x7912B71F::little-4*8, _::binary>>), do: "MessageMediaVenue" | |
def head(<<0xFDB19008::little-4*8, _::binary>>), do: "MessageMediaGame" | |
def head(<<0xB6AEF7B0::little-4*8, _::binary>>), do: "MessageActionEmpty" | |
def head(<<0xA6638B9A::little-4*8, _::binary>>), do: "MessageActionChatCreate" | |
def head(<<0xB5A1CE5A::little-4*8, _::binary>>), do: "MessageActionChatEditTitle" | |
def head(<<0x7FCB13A8::little-4*8, _::binary>>), do: "MessageActionChatEditPhoto" | |
def head(<<0x95E3FBEF::little-4*8, _::binary>>), do: "MessageActionChatDeletePhoto" | |
def head(<<0x488A7337::little-4*8, _::binary>>), do: "MessageActionChatAddUser" | |
def head(<<0xB2AE9B0C::little-4*8, _::binary>>), do: "MessageActionChatDeleteUser" | |
def head(<<0xF89CF5E8::little-4*8, _::binary>>), do: "MessageActionChatJoinedByLink" | |
def head(<<0x95D2AC92::little-4*8, _::binary>>), do: "MessageActionChannelCreate" | |
def head(<<0x51BDB021::little-4*8, _::binary>>), do: "MessageActionChatMigrateTo" | |
def head(<<0xB055EAEE::little-4*8, _::binary>>), do: "MessageActionChannelMigrateFrom" | |
def head(<<0x94BD38ED::little-4*8, _::binary>>), do: "MessageActionPinMessage" | |
def head(<<0x9FBAB604::little-4*8, _::binary>>), do: "MessageActionHistoryClear" | |
def head(<<0x92A72876::little-4*8, _::binary>>), do: "MessageActionGameScore" | |
def head(<<0x80E11A7F::little-4*8, _::binary>>), do: "MessageActionPhoneCall" | |
def head(<<0x66FFBA14::little-4*8, _::binary>>), do: "Dialog" | |
def head(<<0x2331B22D::little-4*8, _::binary>>), do: "PhotoEmpty" | |
def head(<<0x9288DD29::little-4*8, _::binary>>), do: "Photo" | |
def head(<<0x0E17E23C::little-4*8, _::binary>>), do: "PhotoSizeEmpty" | |
def head(<<0x77BFB61B::little-4*8, _::binary>>), do: "PhotoSize" | |
def head(<<0xE9A734FA::little-4*8, _::binary>>), do: "PhotoCachedSize" | |
def head(<<0x1117DD5F::little-4*8, _::binary>>), do: "GeoPointEmpty" | |
def head(<<0x2049D70C::little-4*8, _::binary>>), do: "GeoPoint" | |
def head(<<0x811EA28E::little-4*8, _::binary>>), do: "Auth.CheckedPhone" | |
def head(<<0x5E002502::little-4*8, _::binary>>), do: "Auth.SentCode" | |
def head(<<0xCD050916::little-4*8, _::binary>>), do: "Auth.Authorization" | |
def head(<<0xDF969C2D::little-4*8, _::binary>>), do: "Auth.ExportedAuthorization" | |
def head(<<0xB8BC5B0C::little-4*8, _::binary>>), do: "InputNotifyPeer" | |
def head(<<0x193B4417::little-4*8, _::binary>>), do: "InputNotifyUsers" | |
def head(<<0x4A95E84E::little-4*8, _::binary>>), do: "InputNotifyChats" | |
def head(<<0xA429B886::little-4*8, _::binary>>), do: "InputNotifyAll" | |
def head(<<0xF03064D8::little-4*8, _::binary>>), do: "InputPeerNotifyEventsEmpty" | |
def head(<<0xE86A2C74::little-4*8, _::binary>>), do: "InputPeerNotifyEventsAll" | |
def head(<<0x38935EB2::little-4*8, _::binary>>), do: "InputPeerNotifySettings" | |
def head(<<0xADD53CB3::little-4*8, _::binary>>), do: "PeerNotifyEventsEmpty" | |
def head(<<0x6D1DED88::little-4*8, _::binary>>), do: "PeerNotifyEventsAll" | |
def head(<<0x70A68512::little-4*8, _::binary>>), do: "PeerNotifySettingsEmpty" | |
def head(<<0x9ACDA4C0::little-4*8, _::binary>>), do: "PeerNotifySettings" | |
def head(<<0x818426CD::little-4*8, _::binary>>), do: "PeerSettings" | |
def head(<<0xCCB03657::little-4*8, _::binary>>), do: "WallPaper" | |
def head(<<0x63117F24::little-4*8, _::binary>>), do: "WallPaperSolid" | |
def head(<<0x58DBCAB8::little-4*8, _::binary>>), do: "InputReportReasonSpam" | |
def head(<<0x1E22C78D::little-4*8, _::binary>>), do: "InputReportReasonViolence" | |
def head(<<0x2E59D922::little-4*8, _::binary>>), do: "InputReportReasonPornography" | |
def head(<<0xE1746D0A::little-4*8, _::binary>>), do: "InputReportReasonOther" | |
def head(<<0x0F220F3F::little-4*8, _::binary>>), do: "UserFull" | |
def head(<<0xF911C994::little-4*8, _::binary>>), do: "Contact" | |
def head(<<0xD0028438::little-4*8, _::binary>>), do: "ImportedContact" | |
def head(<<0x561BC879::little-4*8, _::binary>>), do: "ContactBlocked" | |
def head(<<0xD3680C61::little-4*8, _::binary>>), do: "ContactStatus" | |
def head(<<0x3ACE484C::little-4*8, _::binary>>), do: "Contacts.Link" | |
def head(<<0xB74BA9D2::little-4*8, _::binary>>), do: "Contacts.ContactsNotModified" | |
def head(<<0x6F8B8CB2::little-4*8, _::binary>>), do: "Contacts.Contacts" | |
def head(<<0xAD524315::little-4*8, _::binary>>), do: "Contacts.ImportedContacts" | |
def head(<<0x1C138D15::little-4*8, _::binary>>), do: "Contacts.Blocked" | |
def head(<<0x900802A1::little-4*8, _::binary>>), do: "Contacts.BlockedSlice" | |
def head(<<0x15BA6C40::little-4*8, _::binary>>), do: "Messages.Dialogs" | |
def head(<<0x71E094F3::little-4*8, _::binary>>), do: "Messages.DialogsSlice" | |
def head(<<0x8C718E87::little-4*8, _::binary>>), do: "Messages.Messages" | |
def head(<<0x0B446AE3::little-4*8, _::binary>>), do: "Messages.MessagesSlice" | |
def head(<<0x99262E37::little-4*8, _::binary>>), do: "Messages.ChannelMessages" | |
def head(<<0x64FF9FD5::little-4*8, _::binary>>), do: "Messages.Chats" | |
def head(<<0x9CD81144::little-4*8, _::binary>>), do: "Messages.ChatsSlice" | |
def head(<<0xE5D7D19C::little-4*8, _::binary>>), do: "Messages.ChatFull" | |
def head(<<0xB45C69D1::little-4*8, _::binary>>), do: "Messages.AffectedHistory" | |
def head(<<0x57E2F66C::little-4*8, _::binary>>), do: "InputMessagesFilterEmpty" | |
def head(<<0x9609A51C::little-4*8, _::binary>>), do: "InputMessagesFilterPhotos" | |
def head(<<0x9FC00E65::little-4*8, _::binary>>), do: "InputMessagesFilterVideo" | |
def head(<<0x56E9F0E4::little-4*8, _::binary>>), do: "InputMessagesFilterPhotoVideo" | |
def head(<<0xD95E73BB::little-4*8, _::binary>>), do: "InputMessagesFilterPhotoVideoDocuments" | |
def head(<<0x9EDDF188::little-4*8, _::binary>>), do: "InputMessagesFilterDocument" | |
def head(<<0x7EF0DD87::little-4*8, _::binary>>), do: "InputMessagesFilterUrl" | |
def head(<<0xFFC86587::little-4*8, _::binary>>), do: "InputMessagesFilterGif" | |
def head(<<0x50F5C392::little-4*8, _::binary>>), do: "InputMessagesFilterVoice" | |
def head(<<0x3751B49E::little-4*8, _::binary>>), do: "InputMessagesFilterMusic" | |
def head(<<0x3A20ECB8::little-4*8, _::binary>>), do: "InputMessagesFilterChatPhotos" | |
def head(<<0x80C99768::little-4*8, _::binary>>), do: "InputMessagesFilterPhoneCalls" | |
def head(<<0x1F2B0AFD::little-4*8, _::binary>>), do: "UpdateNewMessage" | |
def head(<<0x4E90BFD6::little-4*8, _::binary>>), do: "UpdateMessageID" | |
def head(<<0xA20DB0E5::little-4*8, _::binary>>), do: "UpdateDeleteMessages" | |
def head(<<0x5C486927::little-4*8, _::binary>>), do: "UpdateUserTyping" | |
def head(<<0x9A65EA1F::little-4*8, _::binary>>), do: "UpdateChatUserTyping" | |
def head(<<0x07761198::little-4*8, _::binary>>), do: "UpdateChatParticipants" | |
def head(<<0x1BFBD823::little-4*8, _::binary>>), do: "UpdateUserStatus" | |
def head(<<0xA7332B73::little-4*8, _::binary>>), do: "UpdateUserName" | |
def head(<<0x95313B0C::little-4*8, _::binary>>), do: "UpdateUserPhoto" | |
def head(<<0x2575BBB9::little-4*8, _::binary>>), do: "UpdateContactRegistered" | |
def head(<<0x9D2E67C5::little-4*8, _::binary>>), do: "UpdateContactLink" | |
def head(<<0x12BCBD9A::little-4*8, _::binary>>), do: "UpdateNewEncryptedMessage" | |
def head(<<0x1710F156::little-4*8, _::binary>>), do: "UpdateEncryptedChatTyping" | |
def head(<<0xB4A2E88D::little-4*8, _::binary>>), do: "UpdateEncryption" | |
def head(<<0x38FE25B7::little-4*8, _::binary>>), do: "UpdateEncryptedMessagesRead" | |
def head(<<0xEA4B0E5C::little-4*8, _::binary>>), do: "UpdateChatParticipantAdd" | |
def head(<<0x6E5F8C22::little-4*8, _::binary>>), do: "UpdateChatParticipantDelete" | |
def head(<<0x8E5E9873::little-4*8, _::binary>>), do: "UpdateDcOptions" | |
def head(<<0x80ECE81A::little-4*8, _::binary>>), do: "UpdateUserBlocked" | |
def head(<<0xBEC268EF::little-4*8, _::binary>>), do: "UpdateNotifySettings" | |
def head(<<0xEBE46819::little-4*8, _::binary>>), do: "UpdateServiceNotification" | |
def head(<<0xEE3B272A::little-4*8, _::binary>>), do: "UpdatePrivacy" | |
def head(<<0x12B9417B::little-4*8, _::binary>>), do: "UpdateUserPhone" | |
def head(<<0x9961FD5C::little-4*8, _::binary>>), do: "UpdateReadHistoryInbox" | |
def head(<<0x2F2F21BF::little-4*8, _::binary>>), do: "UpdateReadHistoryOutbox" | |
def head(<<0x7F891213::little-4*8, _::binary>>), do: "UpdateWebPage" | |
def head(<<0x68C13933::little-4*8, _::binary>>), do: "UpdateReadMessagesContents" | |
def head(<<0xEB0467FB::little-4*8, _::binary>>), do: "UpdateChannelTooLong" | |
def head(<<0xB6D45656::little-4*8, _::binary>>), do: "UpdateChannel" | |
def head(<<0x62BA04D9::little-4*8, _::binary>>), do: "UpdateNewChannelMessage" | |
def head(<<0x4214F37F::little-4*8, _::binary>>), do: "UpdateReadChannelInbox" | |
def head(<<0xC37521C9::little-4*8, _::binary>>), do: "UpdateDeleteChannelMessages" | |
def head(<<0x98A12B4B::little-4*8, _::binary>>), do: "UpdateChannelMessageViews" | |
def head(<<0x6E947941::little-4*8, _::binary>>), do: "UpdateChatAdmins" | |
def head(<<0xB6901959::little-4*8, _::binary>>), do: "UpdateChatParticipantAdmin" | |
def head(<<0x688A30AA::little-4*8, _::binary>>), do: "UpdateNewStickerSet" | |
def head(<<0x0BB2D201::little-4*8, _::binary>>), do: "UpdateStickerSetsOrder" | |
def head(<<0x43AE3DEC::little-4*8, _::binary>>), do: "UpdateStickerSets" | |
def head(<<0x9375341E::little-4*8, _::binary>>), do: "UpdateSavedGifs" | |
def head(<<0x54826690::little-4*8, _::binary>>), do: "UpdateBotInlineQuery" | |
def head(<<0x0E48F964::little-4*8, _::binary>>), do: "UpdateBotInlineSend" | |
def head(<<0x1B3F4DF7::little-4*8, _::binary>>), do: "UpdateEditChannelMessage" | |
def head(<<0x98592475::little-4*8, _::binary>>), do: "UpdateChannelPinnedMessage" | |
def head(<<0xE73547E1::little-4*8, _::binary>>), do: "UpdateBotCallbackQuery" | |
def head(<<0xE40370A3::little-4*8, _::binary>>), do: "UpdateEditMessage" | |
def head(<<0xF9D27A5A::little-4*8, _::binary>>), do: "UpdateInlineBotCallbackQuery" | |
def head(<<0x25D6C9C7::little-4*8, _::binary>>), do: "UpdateReadChannelOutbox" | |
def head(<<0xEE2BB969::little-4*8, _::binary>>), do: "UpdateDraftMessage" | |
def head(<<0x571D2742::little-4*8, _::binary>>), do: "UpdateReadFeaturedStickers" | |
def head(<<0x9A422C20::little-4*8, _::binary>>), do: "UpdateRecentStickers" | |
def head(<<0xA229DD06::little-4*8, _::binary>>), do: "UpdateConfig" | |
def head(<<0x3354678F::little-4*8, _::binary>>), do: "UpdatePtsChanged" | |
def head(<<0x40771900::little-4*8, _::binary>>), do: "UpdateChannelWebPage" | |
def head(<<0xAB0F6B1E::little-4*8, _::binary>>), do: "UpdatePhoneCall" | |
def head(<<0xD711A2CC::little-4*8, _::binary>>), do: "UpdateDialogPinned" | |
def head(<<0xD8CAF68D::little-4*8, _::binary>>), do: "UpdatePinnedDialogs" | |
def head(<<0xA56C2A3E::little-4*8, _::binary>>), do: "Updates.State" | |
def head(<<0x5D75A138::little-4*8, _::binary>>), do: "Updates.DifferenceEmpty" | |
def head(<<0x00F49CA0::little-4*8, _::binary>>), do: "Updates.Difference" | |
def head(<<0xA8FB1981::little-4*8, _::binary>>), do: "Updates.DifferenceSlice" | |
def head(<<0x4AFE8F6D::little-4*8, _::binary>>), do: "Updates.DifferenceTooLong" | |
def head(<<0xE317AF7E::little-4*8, _::binary>>), do: "UpdatesTooLong" | |
def head(<<0x914FBF11::little-4*8, _::binary>>), do: "UpdateShortMessage" | |
def head(<<0x16812688::little-4*8, _::binary>>), do: "UpdateShortChatMessage" | |
def head(<<0x78D4DEC1::little-4*8, _::binary>>), do: "UpdateShort" | |
def head(<<0x725B04C3::little-4*8, _::binary>>), do: "UpdatesCombined" | |
def head(<<0x74AE4240::little-4*8, _::binary>>), do: "Updates" | |
def head(<<0x11F1331C::little-4*8, _::binary>>), do: "UpdateShortSentMessage" | |
def head(<<0x8DCA6AA5::little-4*8, _::binary>>), do: "Photos.Photos" | |
def head(<<0x15051F54::little-4*8, _::binary>>), do: "Photos.PhotosSlice" | |
def head(<<0x20212CA8::little-4*8, _::binary>>), do: "Photos.Photo" | |
def head(<<0x096A18D5::little-4*8, _::binary>>), do: "Upload.File" | |
def head(<<0x05D8C6CC::little-4*8, _::binary>>), do: "DcOption" | |
def head(<<0x3AF6FB5F::little-4*8, _::binary>>), do: "Config" | |
def head(<<0x8E1A1775::little-4*8, _::binary>>), do: "NearestDc" | |
def head(<<0x8987F311::little-4*8, _::binary>>), do: "Help.AppUpdate" | |
def head(<<0xC45A6536::little-4*8, _::binary>>), do: "Help.NoAppUpdate" | |
def head(<<0x18CB9F78::little-4*8, _::binary>>), do: "Help.InviteText" | |
def head(<<0xAB7EC0A0::little-4*8, _::binary>>), do: "EncryptedChatEmpty" | |
def head(<<0x3BF703DC::little-4*8, _::binary>>), do: "EncryptedChatWaiting" | |
def head(<<0xC878527E::little-4*8, _::binary>>), do: "EncryptedChatRequested" | |
def head(<<0xFA56CE36::little-4*8, _::binary>>), do: "EncryptedChat" | |
def head(<<0x13D6DD27::little-4*8, _::binary>>), do: "EncryptedChatDiscarded" | |
def head(<<0xF141B5E1::little-4*8, _::binary>>), do: "InputEncryptedChat" | |
def head(<<0xC21F497E::little-4*8, _::binary>>), do: "EncryptedFileEmpty" | |
def head(<<0x4A70994C::little-4*8, _::binary>>), do: "EncryptedFile" | |
def head(<<0x1837C364::little-4*8, _::binary>>), do: "InputEncryptedFileEmpty" | |
def head(<<0x64BD0306::little-4*8, _::binary>>), do: "InputEncryptedFileUploaded" | |
def head(<<0x5A17B5E5::little-4*8, _::binary>>), do: "InputEncryptedFile" | |
def head(<<0x2DC173C8::little-4*8, _::binary>>), do: "InputEncryptedFileBigUploaded" | |
def head(<<0xED18C118::little-4*8, _::binary>>), do: "EncryptedMessage" | |
def head(<<0x23734B06::little-4*8, _::binary>>), do: "EncryptedMessageService" | |
def head(<<0xC0E24635::little-4*8, _::binary>>), do: "Messages.DhConfigNotModified" | |
def head(<<0x2C221EDD::little-4*8, _::binary>>), do: "Messages.DhConfig" | |
def head(<<0x560F8935::little-4*8, _::binary>>), do: "Messages.SentEncryptedMessage" | |
def head(<<0x9493FF32::little-4*8, _::binary>>), do: "Messages.SentEncryptedFile" | |
def head(<<0x72F0EAAE::little-4*8, _::binary>>), do: "InputDocumentEmpty" | |
def head(<<0x18798952::little-4*8, _::binary>>), do: "InputDocument" | |
def head(<<0x36F8C871::little-4*8, _::binary>>), do: "DocumentEmpty" | |
def head(<<0x87232BC7::little-4*8, _::binary>>), do: "Document" | |
def head(<<0x17C6B5F6::little-4*8, _::binary>>), do: "Help.Support" | |
def head(<<0x9FD40BD8::little-4*8, _::binary>>), do: "NotifyPeer" | |
def head(<<0xB4C83B4C::little-4*8, _::binary>>), do: "NotifyUsers" | |
def head(<<0xC007CEC3::little-4*8, _::binary>>), do: "NotifyChats" | |
def head(<<0x74D07C60::little-4*8, _::binary>>), do: "NotifyAll" | |
def head(<<0x16BF744E::little-4*8, _::binary>>), do: "SendMessageTypingAction" | |
def head(<<0xFD5EC8F5::little-4*8, _::binary>>), do: "SendMessageCancelAction" | |
def head(<<0xA187D66F::little-4*8, _::binary>>), do: "SendMessageRecordVideoAction" | |
def head(<<0xE9763AEC::little-4*8, _::binary>>), do: "SendMessageUploadVideoAction" | |
def head(<<0xD52F73F7::little-4*8, _::binary>>), do: "SendMessageRecordAudioAction" | |
def head(<<0xF351D7AB::little-4*8, _::binary>>), do: "SendMessageUploadAudioAction" | |
def head(<<0xD1D34A26::little-4*8, _::binary>>), do: "SendMessageUploadPhotoAction" | |
def head(<<0xAA0CD9E4::little-4*8, _::binary>>), do: "SendMessageUploadDocumentAction" | |
def head(<<0x176F8BA1::little-4*8, _::binary>>), do: "SendMessageGeoLocationAction" | |
def head(<<0x628CBC6F::little-4*8, _::binary>>), do: "SendMessageChooseContactAction" | |
def head(<<0xDD6A8F48::little-4*8, _::binary>>), do: "SendMessageGamePlayAction" | |
def head(<<0x1AA1F784::little-4*8, _::binary>>), do: "Contacts.Found" | |
def head(<<0x4F96CB18::little-4*8, _::binary>>), do: "InputPrivacyKeyStatusTimestamp" | |
def head(<<0xBDFB0426::little-4*8, _::binary>>), do: "InputPrivacyKeyChatInvite" | |
def head(<<0xFABADC5F::little-4*8, _::binary>>), do: "InputPrivacyKeyPhoneCall" | |
def head(<<0xBC2EAB30::little-4*8, _::binary>>), do: "PrivacyKeyStatusTimestamp" | |
def head(<<0x500E6DFA::little-4*8, _::binary>>), do: "PrivacyKeyChatInvite" | |
def head(<<0x3D662B7B::little-4*8, _::binary>>), do: "PrivacyKeyPhoneCall" | |
def head(<<0x0D09E07B::little-4*8, _::binary>>), do: "InputPrivacyValueAllowContacts" | |
def head(<<0x184B35CE::little-4*8, _::binary>>), do: "InputPrivacyValueAllowAll" | |
def head(<<0x131CC67F::little-4*8, _::binary>>), do: "InputPrivacyValueAllowUsers" | |
def head(<<0x0BA52007::little-4*8, _::binary>>), do: "InputPrivacyValueDisallowContacts" | |
def head(<<0xD66B66C9::little-4*8, _::binary>>), do: "InputPrivacyValueDisallowAll" | |
def head(<<0x90110467::little-4*8, _::binary>>), do: "InputPrivacyValueDisallowUsers" | |
def head(<<0xFFFE1BAC::little-4*8, _::binary>>), do: "PrivacyValueAllowContacts" | |
def head(<<0x65427B82::little-4*8, _::binary>>), do: "PrivacyValueAllowAll" | |
def head(<<0x4D5BBE0C::little-4*8, _::binary>>), do: "PrivacyValueAllowUsers" | |
def head(<<0xF888FA1A::little-4*8, _::binary>>), do: "PrivacyValueDisallowContacts" | |
def head(<<0x8B73E763::little-4*8, _::binary>>), do: "PrivacyValueDisallowAll" | |
def head(<<0x0C7F49B7::little-4*8, _::binary>>), do: "PrivacyValueDisallowUsers" | |
def head(<<0x554ABB6F::little-4*8, _::binary>>), do: "Account.PrivacyRules" | |
def head(<<0xB8D0AFDF::little-4*8, _::binary>>), do: "AccountDaysTTL" | |
def head(<<0x6C37C15C::little-4*8, _::binary>>), do: "DocumentAttributeImageSize" | |
def head(<<0x11B58939::little-4*8, _::binary>>), do: "DocumentAttributeAnimated" | |
def head(<<0x6319D612::little-4*8, _::binary>>), do: "DocumentAttributeSticker" | |
def head(<<0x5910CCCB::little-4*8, _::binary>>), do: "DocumentAttributeVideo" | |
def head(<<0x9852F9C6::little-4*8, _::binary>>), do: "DocumentAttributeAudio" | |
def head(<<0x15590068::little-4*8, _::binary>>), do: "DocumentAttributeFilename" | |
def head(<<0x9801D2F7::little-4*8, _::binary>>), do: "DocumentAttributeHasStickers" | |
def head(<<0xF1749A22::little-4*8, _::binary>>), do: "Messages.StickersNotModified" | |
def head(<<0x8A8ECD32::little-4*8, _::binary>>), do: "Messages.Stickers" | |
def head(<<0x12B299D4::little-4*8, _::binary>>), do: "StickerPack" | |
def head(<<0xE86602C3::little-4*8, _::binary>>), do: "Messages.AllStickersNotModified" | |
def head(<<0xEDFD405F::little-4*8, _::binary>>), do: "Messages.AllStickers" | |
def head(<<0xAE636F24::little-4*8, _::binary>>), do: "DisabledFeature" | |
def head(<<0x84D19185::little-4*8, _::binary>>), do: "Messages.AffectedMessages" | |
def head(<<0x5F4F9247::little-4*8, _::binary>>), do: "ContactLinkUnknown" | |
def head(<<0xFEEDD3AD::little-4*8, _::binary>>), do: "ContactLinkNone" | |
def head(<<0x268F3F59::little-4*8, _::binary>>), do: "ContactLinkHasPhone" | |
def head(<<0xD502C2D0::little-4*8, _::binary>>), do: "ContactLinkContact" | |
def head(<<0xEB1477E8::little-4*8, _::binary>>), do: "WebPageEmpty" | |
def head(<<0xC586DA1C::little-4*8, _::binary>>), do: "WebPagePending" | |
def head(<<0x5F07B4BC::little-4*8, _::binary>>), do: "WebPage" | |
def head(<<0x85849473::little-4*8, _::binary>>), do: "WebPageNotModified" | |
def head(<<0x7BF2E6F6::little-4*8, _::binary>>), do: "Authorization" | |
def head(<<0x1250ABDE::little-4*8, _::binary>>), do: "Account.Authorizations" | |
def head(<<0x96DABC18::little-4*8, _::binary>>), do: "Account.NoPassword" | |
def head(<<0x7C18141C::little-4*8, _::binary>>), do: "Account.Password" | |
def head(<<0xB7B72AB3::little-4*8, _::binary>>), do: "Account.PasswordSettings" | |
def head(<<0x86916DEB::little-4*8, _::binary>>), do: "Account.PasswordInputSettings" | |
def head(<<0x137948A5::little-4*8, _::binary>>), do: "Auth.PasswordRecovery" | |
def head(<<0xA384B779::little-4*8, _::binary>>), do: "ReceivedNotifyMessage" | |
def head(<<0x69DF3769::little-4*8, _::binary>>), do: "ChatInviteEmpty" | |
def head(<<0xFC2E05BC::little-4*8, _::binary>>), do: "ChatInviteExported" | |
def head(<<0x5A686D7C::little-4*8, _::binary>>), do: "ChatInviteAlready" | |
def head(<<0xDB74F558::little-4*8, _::binary>>), do: "ChatInvite" | |
def head(<<0xFFB62B95::little-4*8, _::binary>>), do: "InputStickerSetEmpty" | |
def head(<<0x9DE7A269::little-4*8, _::binary>>), do: "InputStickerSetID" | |
def head(<<0x861CC8A0::little-4*8, _::binary>>), do: "InputStickerSetShortName" | |
def head(<<0xCD303B41::little-4*8, _::binary>>), do: "StickerSet" | |
def head(<<0xB60A24A6::little-4*8, _::binary>>), do: "Messages.StickerSet" | |
def head(<<0xC27AC8C7::little-4*8, _::binary>>), do: "BotCommand" | |
def head(<<0x98E81D3A::little-4*8, _::binary>>), do: "BotInfo" | |
def head(<<0xA2FA4880::little-4*8, _::binary>>), do: "KeyboardButton" | |
def head(<<0x258AFF05::little-4*8, _::binary>>), do: "KeyboardButtonUrl" | |
def head(<<0x683A5E46::little-4*8, _::binary>>), do: "KeyboardButtonCallback" | |
def head(<<0xB16A6C29::little-4*8, _::binary>>), do: "KeyboardButtonRequestPhone" | |
def head(<<0xFC796B3F::little-4*8, _::binary>>), do: "KeyboardButtonRequestGeoLocation" | |
def head(<<0x0568A748::little-4*8, _::binary>>), do: "KeyboardButtonSwitchInline" | |
def head(<<0x50F41CCF::little-4*8, _::binary>>), do: "KeyboardButtonGame" | |
def head(<<0x77608B83::little-4*8, _::binary>>), do: "KeyboardButtonRow" | |
def head(<<0xA03E5B85::little-4*8, _::binary>>), do: "ReplyKeyboardHide" | |
def head(<<0xF4108AA0::little-4*8, _::binary>>), do: "ReplyKeyboardForceReply" | |
def head(<<0x3502758C::little-4*8, _::binary>>), do: "ReplyKeyboardMarkup" | |
def head(<<0x48A30254::little-4*8, _::binary>>), do: "ReplyInlineMarkup" | |
def head(<<0xAF7E0394::little-4*8, _::binary>>), do: "Help.AppChangelogEmpty" | |
def head(<<0x2A137E7C::little-4*8, _::binary>>), do: "Help.AppChangelog" | |
def head(<<0xBB92BA95::little-4*8, _::binary>>), do: "MessageEntityUnknown" | |
def head(<<0xFA04579D::little-4*8, _::binary>>), do: "MessageEntityMention" | |
def head(<<0x6F635B0D::little-4*8, _::binary>>), do: "MessageEntityHashtag" | |
def head(<<0x6CEF8AC7::little-4*8, _::binary>>), do: "MessageEntityBotCommand" | |
def head(<<0x6ED02538::little-4*8, _::binary>>), do: "MessageEntityUrl" | |
def head(<<0x64E475C2::little-4*8, _::binary>>), do: "MessageEntityEmail" | |
def head(<<0xBD610BC9::little-4*8, _::binary>>), do: "MessageEntityBold" | |
def head(<<0x826F8B60::little-4*8, _::binary>>), do: "MessageEntityItalic" | |
def head(<<0x28A20571::little-4*8, _::binary>>), do: "MessageEntityCode" | |
def head(<<0x73924BE0::little-4*8, _::binary>>), do: "MessageEntityPre" | |
def head(<<0x76A6D327::little-4*8, _::binary>>), do: "MessageEntityTextUrl" | |
def head(<<0x352DCA58::little-4*8, _::binary>>), do: "MessageEntityMentionName" | |
def head(<<0x208E68C9::little-4*8, _::binary>>), do: "InputMessageEntityMentionName" | |
def head(<<0xEE8C1E86::little-4*8, _::binary>>), do: "InputChannelEmpty" | |
def head(<<0xAFEB712E::little-4*8, _::binary>>), do: "InputChannel" | |
def head(<<0x7F077AD9::little-4*8, _::binary>>), do: "Contacts.ResolvedPeer" | |
def head(<<0x0AE30253::little-4*8, _::binary>>), do: "MessageRange" | |
def head(<<0x3E11AFFB::little-4*8, _::binary>>), do: "Updates.ChannelDifferenceEmpty" | |
def head(<<0x410DEE07::little-4*8, _::binary>>), do: "Updates.ChannelDifferenceTooLong" | |
def head(<<0x2064674E::little-4*8, _::binary>>), do: "Updates.ChannelDifference" | |
def head(<<0x94D42EE7::little-4*8, _::binary>>), do: "ChannelMessagesFilterEmpty" | |
def head(<<0xCD77D957::little-4*8, _::binary>>), do: "ChannelMessagesFilter" | |
def head(<<0x15EBAC1D::little-4*8, _::binary>>), do: "ChannelParticipant" | |
def head(<<0xA3289A6D::little-4*8, _::binary>>), do: "ChannelParticipantSelf" | |
def head(<<0x91057FEF::little-4*8, _::binary>>), do: "ChannelParticipantModerator" | |
def head(<<0x98192D61::little-4*8, _::binary>>), do: "ChannelParticipantEditor" | |
def head(<<0x8CC5E69A::little-4*8, _::binary>>), do: "ChannelParticipantKicked" | |
def head(<<0xE3E2E1F9::little-4*8, _::binary>>), do: "ChannelParticipantCreator" | |
def head(<<0xDE3F3C79::little-4*8, _::binary>>), do: "ChannelParticipantsRecent" | |
def head(<<0xB4608969::little-4*8, _::binary>>), do: "ChannelParticipantsAdmins" | |
def head(<<0x3C37BB7A::little-4*8, _::binary>>), do: "ChannelParticipantsKicked" | |
def head(<<0xB0D1865B::little-4*8, _::binary>>), do: "ChannelParticipantsBots" | |
def head(<<0xB285A0C6::little-4*8, _::binary>>), do: "ChannelRoleEmpty" | |
def head(<<0x9618D975::little-4*8, _::binary>>), do: "ChannelRoleModerator" | |
def head(<<0x820BFE8C::little-4*8, _::binary>>), do: "ChannelRoleEditor" | |
def head(<<0xF56EE2A8::little-4*8, _::binary>>), do: "Channels.ChannelParticipants" | |
def head(<<0xD0D9B163::little-4*8, _::binary>>), do: "Channels.ChannelParticipant" | |
def head(<<0xF1EE3E90::little-4*8, _::binary>>), do: "Help.TermsOfService" | |
def head(<<0x162ECC1F::little-4*8, _::binary>>), do: "FoundGif" | |
def head(<<0x9C750409::little-4*8, _::binary>>), do: "FoundGifCached" | |
def head(<<0x450A1C0A::little-4*8, _::binary>>), do: "Messages.FoundGifs" | |
def head(<<0xE8025CA2::little-4*8, _::binary>>), do: "Messages.SavedGifsNotModified" | |
def head(<<0x2E0709A5::little-4*8, _::binary>>), do: "Messages.SavedGifs" | |
def head(<<0x292FED13::little-4*8, _::binary>>), do: "InputBotInlineMessageMediaAuto" | |
def head(<<0x3DCD7A87::little-4*8, _::binary>>), do: "InputBotInlineMessageText" | |
def head(<<0xF4A59DE1::little-4*8, _::binary>>), do: "InputBotInlineMessageMediaGeo" | |
def head(<<0xAAAFADC8::little-4*8, _::binary>>), do: "InputBotInlineMessageMediaVenue" | |
def head(<<0x2DAF01A7::little-4*8, _::binary>>), do: "InputBotInlineMessageMediaContact" | |
def head(<<0x4B425864::little-4*8, _::binary>>), do: "InputBotInlineMessageGame" | |
def head(<<0x2CBBE15A::little-4*8, _::binary>>), do: "InputBotInlineResult" | |
def head(<<0xA8D864A7::little-4*8, _::binary>>), do: "InputBotInlineResultPhoto" | |
def head(<<0xFFF8FDC4::little-4*8, _::binary>>), do: "InputBotInlineResultDocument" | |
def head(<<0x4FA417F2::little-4*8, _::binary>>), do: "InputBotInlineResultGame" | |
def head(<<0x0A74B15B::little-4*8, _::binary>>), do: "BotInlineMessageMediaAuto" | |
def head(<<0x8C7F65E2::little-4*8, _::binary>>), do: "BotInlineMessageText" | |
def head(<<0x3A8FD8B8::little-4*8, _::binary>>), do: "BotInlineMessageMediaGeo" | |
def head(<<0x4366232E::little-4*8, _::binary>>), do: "BotInlineMessageMediaVenue" | |
def head(<<0x35EDB4D4::little-4*8, _::binary>>), do: "BotInlineMessageMediaContact" | |
def head(<<0x9BEBAEB9::little-4*8, _::binary>>), do: "BotInlineResult" | |
def head(<<0x17DB940B::little-4*8, _::binary>>), do: "BotInlineMediaResult" | |
def head(<<0xCCD3563D::little-4*8, _::binary>>), do: "Messages.BotResults" | |
def head(<<0x1F486803::little-4*8, _::binary>>), do: "ExportedMessageLink" | |
def head(<<0xC786DDCB::little-4*8, _::binary>>), do: "MessageFwdHeader" | |
def head(<<0x72A3158C::little-4*8, _::binary>>), do: "Auth.CodeTypeSms" | |
def head(<<0x741CD3E3::little-4*8, _::binary>>), do: "Auth.CodeTypeCall" | |
def head(<<0x226CCEFB::little-4*8, _::binary>>), do: "Auth.CodeTypeFlashCall" | |
def head(<<0x3DBB5986::little-4*8, _::binary>>), do: "Auth.SentCodeTypeApp" | |
def head(<<0xC000BBA2::little-4*8, _::binary>>), do: "Auth.SentCodeTypeSms" | |
def head(<<0x5353E5A7::little-4*8, _::binary>>), do: "Auth.SentCodeTypeCall" | |
def head(<<0xAB03C6D9::little-4*8, _::binary>>), do: "Auth.SentCodeTypeFlashCall" | |
def head(<<0x36585EA4::little-4*8, _::binary>>), do: "Messages.BotCallbackAnswer" | |
def head(<<0x26B5DDE6::little-4*8, _::binary>>), do: "Messages.MessageEditData" | |
def head(<<0x890C3D89::little-4*8, _::binary>>), do: "InputBotInlineMessageID" | |
def head(<<0x3C20629F::little-4*8, _::binary>>), do: "InlineBotSwitchPM" | |
def head(<<0x3371C354::little-4*8, _::binary>>), do: "Messages.PeerDialogs" | |
def head(<<0xEDCDC05B::little-4*8, _::binary>>), do: "TopPeer" | |
def head(<<0xAB661B5B::little-4*8, _::binary>>), do: "TopPeerCategoryBotsPM" | |
def head(<<0x148677E2::little-4*8, _::binary>>), do: "TopPeerCategoryBotsInline" | |
def head(<<0x0637B7ED::little-4*8, _::binary>>), do: "TopPeerCategoryCorrespondents" | |
def head(<<0xBD17A14A::little-4*8, _::binary>>), do: "TopPeerCategoryGroups" | |
def head(<<0x161D9628::little-4*8, _::binary>>), do: "TopPeerCategoryChannels" | |
def head(<<0xFB834291::little-4*8, _::binary>>), do: "TopPeerCategoryPeers" | |
def head(<<0xDE266EF5::little-4*8, _::binary>>), do: "Contacts.TopPeersNotModified" | |
def head(<<0x70B772A8::little-4*8, _::binary>>), do: "Contacts.TopPeers" | |
def head(<<0xBA4BAEC5::little-4*8, _::binary>>), do: "DraftMessageEmpty" | |
def head(<<0xFD8E711F::little-4*8, _::binary>>), do: "DraftMessage" | |
def head(<<0x04EDE3CF::little-4*8, _::binary>>), do: "Messages.FeaturedStickersNotModified" | |
def head(<<0xF89D88E5::little-4*8, _::binary>>), do: "Messages.FeaturedStickers" | |
def head(<<0x0B17F890::little-4*8, _::binary>>), do: "Messages.RecentStickersNotModified" | |
def head(<<0x5CE20970::little-4*8, _::binary>>), do: "Messages.RecentStickers" | |
def head(<<0x4FCBA9C8::little-4*8, _::binary>>), do: "Messages.ArchivedStickers" | |
def head(<<0x38641628::little-4*8, _::binary>>), do: "Messages.StickerSetInstallResultSuccess" | |
def head(<<0x35E410A8::little-4*8, _::binary>>), do: "Messages.StickerSetInstallResultArchive" | |
def head(<<0x6410A5D2::little-4*8, _::binary>>), do: "StickerSetCovered" | |
def head(<<0x3407E51B::little-4*8, _::binary>>), do: "StickerSetMultiCovered" | |
def head(<<0xAED6DBB2::little-4*8, _::binary>>), do: "MaskCoords" | |
def head(<<0x4A992157::little-4*8, _::binary>>), do: "InputStickeredMediaPhoto" | |
def head(<<0x0438865B::little-4*8, _::binary>>), do: "InputStickeredMediaDocument" | |
def head(<<0xBDF9653B::little-4*8, _::binary>>), do: "Game" | |
def head(<<0x032C3E77::little-4*8, _::binary>>), do: "InputGameID" | |
def head(<<0xC331E80A::little-4*8, _::binary>>), do: "InputGameShortName" | |
def head(<<0x58FFFCD0::little-4*8, _::binary>>), do: "HighScore" | |
def head(<<0x9A3BFD99::little-4*8, _::binary>>), do: "Messages.HighScores" | |
def head(<<0xDC3D824F::little-4*8, _::binary>>), do: "TextEmpty" | |
def head(<<0x744694E0::little-4*8, _::binary>>), do: "TextPlain" | |
def head(<<0x6724ABC4::little-4*8, _::binary>>), do: "TextBold" | |
def head(<<0xD912A59C::little-4*8, _::binary>>), do: "TextItalic" | |
def head(<<0xC12622C4::little-4*8, _::binary>>), do: "TextUnderline" | |
def head(<<0x9BF8BB95::little-4*8, _::binary>>), do: "TextStrike" | |
def head(<<0x6C3F19B9::little-4*8, _::binary>>), do: "TextFixed" | |
def head(<<0x3C2884C1::little-4*8, _::binary>>), do: "TextUrl" | |
def head(<<0xDE5A0DD6::little-4*8, _::binary>>), do: "TextEmail" | |
def head(<<0x7E6260D7::little-4*8, _::binary>>), do: "TextConcat" | |
def head(<<0x13567E8A::little-4*8, _::binary>>), do: "PageBlockUnsupported" | |
def head(<<0x70ABC3FD::little-4*8, _::binary>>), do: "PageBlockTitle" | |
def head(<<0x8FFA9A1F::little-4*8, _::binary>>), do: "PageBlockSubtitle" | |
def head(<<0xBAAFE5E0::little-4*8, _::binary>>), do: "PageBlockAuthorDate" | |
def head(<<0xBFD064EC::little-4*8, _::binary>>), do: "PageBlockHeader" | |
def head(<<0xF12BB6E1::little-4*8, _::binary>>), do: "PageBlockSubheader" | |
def head(<<0x467A0766::little-4*8, _::binary>>), do: "PageBlockParagraph" | |
def head(<<0xC070D93E::little-4*8, _::binary>>), do: "PageBlockPreformatted" | |
def head(<<0x48870999::little-4*8, _::binary>>), do: "PageBlockFooter" | |
def head(<<0xDB20B188::little-4*8, _::binary>>), do: "PageBlockDivider" | |
def head(<<0xCE0D37B0::little-4*8, _::binary>>), do: "PageBlockAnchor" | |
def head(<<0x3A58C7F4::little-4*8, _::binary>>), do: "PageBlockList" | |
def head(<<0x263D7C26::little-4*8, _::binary>>), do: "PageBlockBlockquote" | |
def head(<<0x4F4456D3::little-4*8, _::binary>>), do: "PageBlockPullquote" | |
def head(<<0xE9C69982::little-4*8, _::binary>>), do: "PageBlockPhoto" | |
def head(<<0xD9D71866::little-4*8, _::binary>>), do: "PageBlockVideo" | |
def head(<<0x39F23300::little-4*8, _::binary>>), do: "PageBlockCover" | |
def head(<<0xCDE200D1::little-4*8, _::binary>>), do: "PageBlockEmbed" | |
def head(<<0x292C7BE9::little-4*8, _::binary>>), do: "PageBlockEmbedPost" | |
def head(<<0x08B31C4F::little-4*8, _::binary>>), do: "PageBlockCollage" | |
def head(<<0x130C8963::little-4*8, _::binary>>), do: "PageBlockSlideshow" | |
def head(<<0x8DEE6C44::little-4*8, _::binary>>), do: "PagePart" | |
def head(<<0xD7A19D69::little-4*8, _::binary>>), do: "PageFull" | |
def head(<<0x1E36FDED::little-4*8, _::binary>>), do: "InputPhoneCall" | |
def head(<<0x5366C915::little-4*8, _::binary>>), do: "PhoneCallEmpty" | |
def head(<<0x1B8F4AD1::little-4*8, _::binary>>), do: "PhoneCallWaiting" | |
def head(<<0x6C448AE8::little-4*8, _::binary>>), do: "PhoneCallRequested" | |
def head(<<0xFFE6AB67::little-4*8, _::binary>>), do: "PhoneCall" | |
def head(<<0x50CA4DE1::little-4*8, _::binary>>), do: "PhoneCallDiscarded" | |
def head(<<0x9D4C17C0::little-4*8, _::binary>>), do: "PhoneConnection" | |
def head(<<0xA2BB35CB::little-4*8, _::binary>>), do: "PhoneCallProtocol" | |
def head(<<0xEC82E140::little-4*8, _::binary>>), do: "Phone.PhoneCall" | |
def head(<<0x85E42301::little-4*8, _::binary>>), do: "PhoneCallDiscardReasonMissed" | |
def head(<<0xE095C1A0::little-4*8, _::binary>>), do: "PhoneCallDiscardReasonDisconnect" | |
def head(<<0x57ADC690::little-4*8, _::binary>>), do: "PhoneCallDiscardReasonHangup" | |
def head(<<0xFAF7E8C9::little-4*8, _::binary>>), do: "PhoneCallDiscardReasonBusy" | |
# Function - heads | |
def head(<<0x60469778::little-4*8, _::binary>>), do: "req_pq" | |
def head(<<0xD712E4BE::little-4*8, _::binary>>), do: "req_dh_params" | |
def head(<<0xF5045F1F::little-4*8, _::binary>>), do: "set_client_dh_params" | |
def head(<<0x58E4A740::little-4*8, _::binary>>), do: "rpc_drop_answer" | |
def head(<<0xB921BD04::little-4*8, _::binary>>), do: "get_future_salts" | |
def head(<<0x7ABE77EC::little-4*8, _::binary>>), do: "ping" | |
def head(<<0xF3427B8C::little-4*8, _::binary>>), do: "ping_delay_disconnect" | |
def head(<<0xE7512126::little-4*8, _::binary>>), do: "destroy_session" | |
def head(<<0x9A5F6E95::little-4*8, _::binary>>), do: "contest_savedeveloperinfo" | |
def head(<<0xCB9F372D::little-4*8, _::binary>>), do: "invokeaftermsg" | |
def head(<<0x3DC4B4F0::little-4*8, _::binary>>), do: "invokeaftermsgs" | |
def head(<<0x69796DE9::little-4*8, _::binary>>), do: "initconnection" | |
def head(<<0xDA9B0D0D::little-4*8, _::binary>>), do: "invokewithlayer" | |
def head(<<0xBF9459B7::little-4*8, _::binary>>), do: "invokewithoutupdates" | |
def head(<<0x6FE51DFB::little-4*8, _::binary>>), do: "auth_checkphone" | |
def head(<<0x86AEF0EC::little-4*8, _::binary>>), do: "auth_sendcode" | |
def head(<<0x1B067634::little-4*8, _::binary>>), do: "auth_signup" | |
def head(<<0xBCD51581::little-4*8, _::binary>>), do: "auth_signin" | |
def head(<<0x5717DA40::little-4*8, _::binary>>), do: "auth_logout" | |
def head(<<0x9FAB0D1A::little-4*8, _::binary>>), do: "auth_resetauthorizations" | |
def head(<<0x771C1D97::little-4*8, _::binary>>), do: "auth_sendinvites" | |
def head(<<0xE5BFFFCD::little-4*8, _::binary>>), do: "auth_exportauthorization" | |
def head(<<0xE3EF9613::little-4*8, _::binary>>), do: "auth_importauthorization" | |
def head(<<0xCDD42A05::little-4*8, _::binary>>), do: "auth_bindtempauthkey" | |
def head(<<0x67A3FF2C::little-4*8, _::binary>>), do: "auth_importbotauthorization" | |
def head(<<0x0A63011E::little-4*8, _::binary>>), do: "auth_checkpassword" | |
def head(<<0xD897BC66::little-4*8, _::binary>>), do: "auth_requestpasswordrecovery" | |
def head(<<0x4EA56E92::little-4*8, _::binary>>), do: "auth_recoverpassword" | |
def head(<<0x3EF1A9BF::little-4*8, _::binary>>), do: "auth_resendcode" | |
def head(<<0x1F040578::little-4*8, _::binary>>), do: "auth_cancelcode" | |
def head(<<0x8E48A188::little-4*8, _::binary>>), do: "auth_droptempauthkeys" | |
def head(<<0x637EA878::little-4*8, _::binary>>), do: "account_registerdevice" | |
def head(<<0x65C55B40::little-4*8, _::binary>>), do: "account_unregisterdevice" | |
def head(<<0x84BE5B93::little-4*8, _::binary>>), do: "account_updatenotifysettings" | |
def head(<<0x12B3AD31::little-4*8, _::binary>>), do: "account_getnotifysettings" | |
def head(<<0xDB7E1747::little-4*8, _::binary>>), do: "account_resetnotifysettings" | |
def head(<<0x78515775::little-4*8, _::binary>>), do: "account_updateprofile" | |
def head(<<0x6628562C::little-4*8, _::binary>>), do: "account_updatestatus" | |
def head(<<0xC04CFAC2::little-4*8, _::binary>>), do: "account_getwallpapers" | |
def head(<<0xAE189D5F::little-4*8, _::binary>>), do: "account_reportpeer" | |
def head(<<0x2714D86C::little-4*8, _::binary>>), do: "account_checkusername" | |
def head(<<0x3E0BDD7C::little-4*8, _::binary>>), do: "account_updateusername" | |
def head(<<0xDADBC950::little-4*8, _::binary>>), do: "account_getprivacy" | |
def head(<<0xC9F81CE8::little-4*8, _::binary>>), do: "account_setprivacy" | |
def head(<<0x418D4E0B::little-4*8, _::binary>>), do: "account_deleteaccount" | |
def head(<<0x08FC711D::little-4*8, _::binary>>), do: "account_getaccountttl" | |
def head(<<0x2442485E::little-4*8, _::binary>>), do: "account_setaccountttl" | |
def head(<<0x08E57DEB::little-4*8, _::binary>>), do: "account_sendchangephonecode" | |
def head(<<0x70C32EDB::little-4*8, _::binary>>), do: "account_changephone" | |
def head(<<0x38DF3532::little-4*8, _::binary>>), do: "account_updatedevicelocked" | |
def head(<<0xE320C158::little-4*8, _::binary>>), do: "account_getauthorizations" | |
def head(<<0xDF77F3BC::little-4*8, _::binary>>), do: "account_resetauthorization" | |
def head(<<0x548A30F5::little-4*8, _::binary>>), do: "account_getpassword" | |
def head(<<0xBC8D11BB::little-4*8, _::binary>>), do: "account_getpasswordsettings" | |
def head(<<0xFA7C4B86::little-4*8, _::binary>>), do: "account_updatepasswordsettings" | |
def head(<<0x1516D7BD::little-4*8, _::binary>>), do: "account_sendconfirmphonecode" | |
def head(<<0x5F2178C3::little-4*8, _::binary>>), do: "account_confirmphone" | |
def head(<<0x0D91A548::little-4*8, _::binary>>), do: "users_getusers" | |
def head(<<0xCA30A5B1::little-4*8, _::binary>>), do: "users_getfulluser" | |
def head(<<0xC4A353EE::little-4*8, _::binary>>), do: "contacts_getstatuses" | |
def head(<<0x22C6AA08::little-4*8, _::binary>>), do: "contacts_getcontacts" | |
def head(<<0xDA30B32D::little-4*8, _::binary>>), do: "contacts_importcontacts" | |
def head(<<0x8E953744::little-4*8, _::binary>>), do: "contacts_deletecontact" | |
def head(<<0x59AB389E::little-4*8, _::binary>>), do: "contacts_deletecontacts" | |
def head(<<0x332B49FC::little-4*8, _::binary>>), do: "contacts_block" | |
def head(<<0xE54100BD::little-4*8, _::binary>>), do: "contacts_unblock" | |
def head(<<0xF57C350F::little-4*8, _::binary>>), do: "contacts_getblocked" | |
def head(<<0x84E53737::little-4*8, _::binary>>), do: "contacts_exportcard" | |
def head(<<0x4FE196FE::little-4*8, _::binary>>), do: "contacts_importcard" | |
def head(<<0x11F812D8::little-4*8, _::binary>>), do: "contacts_search" | |
def head(<<0xF93CCBA3::little-4*8, _::binary>>), do: "contacts_resolveusername" | |
def head(<<0xD4982DB5::little-4*8, _::binary>>), do: "contacts_gettoppeers" | |
def head(<<0x1AE373AC::little-4*8, _::binary>>), do: "contacts_resettoppeerrating" | |
def head(<<0x4222FA74::little-4*8, _::binary>>), do: "messages_getmessages" | |
def head(<<0x191BA9C5::little-4*8, _::binary>>), do: "messages_getdialogs" | |
def head(<<0xAFA92846::little-4*8, _::binary>>), do: "messages_gethistory" | |
def head(<<0xD4569248::little-4*8, _::binary>>), do: "messages_search" | |
def head(<<0x0E306D3A::little-4*8, _::binary>>), do: "messages_readhistory" | |
def head(<<0x1C015B09::little-4*8, _::binary>>), do: "messages_deletehistory" | |
def head(<<0xE58E95D2::little-4*8, _::binary>>), do: "messages_deletemessages" | |
def head(<<0x05A954C0::little-4*8, _::binary>>), do: "messages_receivedmessages" | |
def head(<<0xA3825E50::little-4*8, _::binary>>), do: "messages_settyping" | |
def head(<<0xFA88427A::little-4*8, _::binary>>), do: "messages_sendmessage" | |
def head(<<0xC8F16791::little-4*8, _::binary>>), do: "messages_sendmedia" | |
def head(<<0x708E0195::little-4*8, _::binary>>), do: "messages_forwardmessages" | |
def head(<<0xCF1592DB::little-4*8, _::binary>>), do: "messages_reportspam" | |
def head(<<0xA8F1709B::little-4*8, _::binary>>), do: "messages_hidereportspam" | |
def head(<<0x3672E09C::little-4*8, _::binary>>), do: "messages_getpeersettings" | |
def head(<<0x3C6AA187::little-4*8, _::binary>>), do: "messages_getchats" | |
def head(<<0x3B831C66::little-4*8, _::binary>>), do: "messages_getfullchat" | |
def head(<<0xDC452855::little-4*8, _::binary>>), do: "messages_editchattitle" | |
def head(<<0xCA4C79D8::little-4*8, _::binary>>), do: "messages_editchatphoto" | |
def head(<<0xF9A0AA09::little-4*8, _::binary>>), do: "messages_addchatuser" | |
def head(<<0xE0611F16::little-4*8, _::binary>>), do: "messages_deletechatuser" | |
def head(<<0x09CB126E::little-4*8, _::binary>>), do: "messages_createchat" | |
def head(<<0x33963BF9::little-4*8, _::binary>>), do: "messages_forwardmessage" | |
def head(<<0x26CF8950::little-4*8, _::binary>>), do: "messages_getdhconfig" | |
def head(<<0xF64DAF43::little-4*8, _::binary>>), do: "messages_requestencryption" | |
def head(<<0x3DBC0415::little-4*8, _::binary>>), do: "messages_acceptencryption" | |
def head(<<0xEDD923C5::little-4*8, _::binary>>), do: "messages_discardencryption" | |
def head(<<0x791451ED::little-4*8, _::binary>>), do: "messages_setencryptedtyping" | |
def head(<<0x7F4B690A::little-4*8, _::binary>>), do: "messages_readencryptedhistory" | |
def head(<<0xA9776773::little-4*8, _::binary>>), do: "messages_sendencrypted" | |
def head(<<0x9A901B66::little-4*8, _::binary>>), do: "messages_sendencryptedfile" | |
def head(<<0x32D439A4::little-4*8, _::binary>>), do: "messages_sendencryptedservice" | |
def head(<<0x55A5BB66::little-4*8, _::binary>>), do: "messages_receivedqueue" | |
def head(<<0x4B0C8C0F::little-4*8, _::binary>>), do: "messages_reportencryptedspam" | |
def head(<<0x36A73F77::little-4*8, _::binary>>), do: "messages_readmessagecontents" | |
def head(<<0x1C9618B1::little-4*8, _::binary>>), do: "messages_getallstickers" | |
def head(<<0x25223E24::little-4*8, _::binary>>), do: "messages_getwebpagepreview" | |
def head(<<0x7D885289::little-4*8, _::binary>>), do: "messages_exportchatinvite" | |
def head(<<0x3EADB1BB::little-4*8, _::binary>>), do: "messages_checkchatinvite" | |
def head(<<0x6C50051C::little-4*8, _::binary>>), do: "messages_importchatinvite" | |
def head(<<0x2619A90E::little-4*8, _::binary>>), do: "messages_getstickerset" | |
def head(<<0xC78FE460::little-4*8, _::binary>>), do: "messages_installstickerset" | |
def head(<<0xF96E55DE::little-4*8, _::binary>>), do: "messages_uninstallstickerset" | |
def head(<<0xE6DF7378::little-4*8, _::binary>>), do: "messages_startbot" | |
def head(<<0xC4C8A55D::little-4*8, _::binary>>), do: "messages_getmessagesviews" | |
def head(<<0xEC8BD9E1::little-4*8, _::binary>>), do: "messages_togglechatadmins" | |
def head(<<0xA9E69F2E::little-4*8, _::binary>>), do: "messages_editchatadmin" | |
def head(<<0x15A3B8E3::little-4*8, _::binary>>), do: "messages_migratechat" | |
def head(<<0x9E3CACB0::little-4*8, _::binary>>), do: "messages_searchglobal" | |
def head(<<0x78337739::little-4*8, _::binary>>), do: "messages_reorderstickersets" | |
def head(<<0x338E2464::little-4*8, _::binary>>), do: "messages_getdocumentbyhash" | |
def head(<<0xBF9A776B::little-4*8, _::binary>>), do: "messages_searchgifs" | |
def head(<<0x83BF3D52::little-4*8, _::binary>>), do: "messages_getsavedgifs" | |
def head(<<0x327A30CB::little-4*8, _::binary>>), do: "messages_savegif" | |
def head(<<0x514E999D::little-4*8, _::binary>>), do: "messages_getinlinebotresults" | |
def head(<<0xEB5EA206::little-4*8, _::binary>>), do: "messages_setinlinebotresults" | |
def head(<<0xB16E06FE::little-4*8, _::binary>>), do: "messages_sendinlinebotresult" | |
def head(<<0xFDA68D36::little-4*8, _::binary>>), do: "messages_getmessageeditdata" | |
def head(<<0xCE91E4CA::little-4*8, _::binary>>), do: "messages_editmessage" | |
def head(<<0x130C2C85::little-4*8, _::binary>>), do: "messages_editinlinebotmessage" | |
def head(<<0x810A9FEC::little-4*8, _::binary>>), do: "messages_getbotcallbackanswer" | |
def head(<<0xD58F130A::little-4*8, _::binary>>), do: "messages_setbotcallbackanswer" | |
def head(<<0x2D9776B9::little-4*8, _::binary>>), do: "messages_getpeerdialogs" | |
def head(<<0xBC39E14B::little-4*8, _::binary>>), do: "messages_savedraft" | |
def head(<<0x6A3F8D65::little-4*8, _::binary>>), do: "messages_getalldrafts" | |
def head(<<0x2DACCA4F::little-4*8, _::binary>>), do: "messages_getfeaturedstickers" | |
def head(<<0x5B118126::little-4*8, _::binary>>), do: "messages_readfeaturedstickers" | |
def head(<<0x5EA192C9::little-4*8, _::binary>>), do: "messages_getrecentstickers" | |
def head(<<0x392718F8::little-4*8, _::binary>>), do: "messages_saverecentsticker" | |
def head(<<0x8999602D::little-4*8, _::binary>>), do: "messages_clearrecentstickers" | |
def head(<<0x57F17692::little-4*8, _::binary>>), do: "messages_getarchivedstickers" | |
def head(<<0x65B8C79F::little-4*8, _::binary>>), do: "messages_getmaskstickers" | |
def head(<<0xCC5B67CC::little-4*8, _::binary>>), do: "messages_getattachedstickers" | |
def head(<<0x8EF8ECC0::little-4*8, _::binary>>), do: "messages_setgamescore" | |
def head(<<0x15AD9F64::little-4*8, _::binary>>), do: "messages_setinlinegamescore" | |
def head(<<0xE822649D::little-4*8, _::binary>>), do: "messages_getgamehighscores" | |
def head(<<0x0F635E1B::little-4*8, _::binary>>), do: "messages_getinlinegamehighscores" | |
def head(<<0x0D0A48C4::little-4*8, _::binary>>), do: "messages_getcommonchats" | |
def head(<<0xEBA80FF0::little-4*8, _::binary>>), do: "messages_getallchats" | |
def head(<<0x32CA8F91::little-4*8, _::binary>>), do: "messages_getwebpage" | |
def head(<<0x3289BE6A::little-4*8, _::binary>>), do: "messages_toggledialogpin" | |
def head(<<0x959FF644::little-4*8, _::binary>>), do: "messages_reorderpinneddialogs" | |
def head(<<0xE254D64E::little-4*8, _::binary>>), do: "messages_getpinneddialogs" | |
def head(<<0xEDD4882A::little-4*8, _::binary>>), do: "updates_getstate" | |
def head(<<0x25939651::little-4*8, _::binary>>), do: "updates_getdifference" | |
def head(<<0x03173D78::little-4*8, _::binary>>), do: "updates_getchanneldifference" | |
def head(<<0xF0BB5152::little-4*8, _::binary>>), do: "photos_updateprofilephoto" | |
def head(<<0x4F32C098::little-4*8, _::binary>>), do: "photos_uploadprofilephoto" | |
def head(<<0x87CF7F2F::little-4*8, _::binary>>), do: "photos_deletephotos" | |
def head(<<0x91CD32A8::little-4*8, _::binary>>), do: "photos_getuserphotos" | |
def head(<<0xB304A621::little-4*8, _::binary>>), do: "upload_savefilepart" | |
def head(<<0xE3A6CFB5::little-4*8, _::binary>>), do: "upload_getfile" | |
def head(<<0xDE7B673D::little-4*8, _::binary>>), do: "upload_savebigfilepart" | |
def head(<<0xC4F9186B::little-4*8, _::binary>>), do: "help_getconfig" | |
def head(<<0x1FB33026::little-4*8, _::binary>>), do: "help_getnearestdc" | |
def head(<<0xAE2DE196::little-4*8, _::binary>>), do: "help_getappupdate" | |
def head(<<0x6F02F748::little-4*8, _::binary>>), do: "help_saveapplog" | |
def head(<<0x4D392343::little-4*8, _::binary>>), do: "help_getinvitetext" | |
def head(<<0x9CDF08CD::little-4*8, _::binary>>), do: "help_getsupport" | |
def head(<<0xB921197A::little-4*8, _::binary>>), do: "help_getappchangelog" | |
def head(<<0x350170F3::little-4*8, _::binary>>), do: "help_gettermsofservice" | |
def head(<<0xEC22CFCD::little-4*8, _::binary>>), do: "help_setbotupdatesstatus" | |
def head(<<0xCC104937::little-4*8, _::binary>>), do: "channels_readhistory" | |
def head(<<0x84C1FD4E::little-4*8, _::binary>>), do: "channels_deletemessages" | |
def head(<<0xD10DD71B::little-4*8, _::binary>>), do: "channels_deleteuserhistory" | |
def head(<<0xFE087810::little-4*8, _::binary>>), do: "channels_reportspam" | |
def head(<<0x93D7B347::little-4*8, _::binary>>), do: "channels_getmessages" | |
def head(<<0x24D98F92::little-4*8, _::binary>>), do: "channels_getparticipants" | |
def head(<<0x546DD7A6::little-4*8, _::binary>>), do: "channels_getparticipant" | |
def head(<<0x0A7F6BBB::little-4*8, _::binary>>), do: "channels_getchannels" | |
def head(<<0x08736A09::little-4*8, _::binary>>), do: "channels_getfullchannel" | |
def head(<<0xF4893D7F::little-4*8, _::binary>>), do: "channels_createchannel" | |
def head(<<0x13E27F1E::little-4*8, _::binary>>), do: "channels_editabout" | |
def head(<<0xEB7611D0::little-4*8, _::binary>>), do: "channels_editadmin" | |
def head(<<0x566DECD0::little-4*8, _::binary>>), do: "channels_edittitle" | |
def head(<<0xF12E57C9::little-4*8, _::binary>>), do: "channels_editphoto" | |
def head(<<0x10E6BD2C::little-4*8, _::binary>>), do: "channels_checkusername" | |
def head(<<0x3514B3DE::little-4*8, _::binary>>), do: "channels_updateusername" | |
def head(<<0x24B524C5::little-4*8, _::binary>>), do: "channels_joinchannel" | |
def head(<<0xF836AA95::little-4*8, _::binary>>), do: "channels_leavechannel" | |
def head(<<0x199F3A6C::little-4*8, _::binary>>), do: "channels_invitetochannel" | |
def head(<<0xA672DE14::little-4*8, _::binary>>), do: "channels_kickfromchannel" | |
def head(<<0xC7560885::little-4*8, _::binary>>), do: "channels_exportinvite" | |
def head(<<0xC0111FE3::little-4*8, _::binary>>), do: "channels_deletechannel" | |
def head(<<0x49609307::little-4*8, _::binary>>), do: "channels_toggleinvites" | |
def head(<<0xC846D22D::little-4*8, _::binary>>), do: "channels_exportmessagelink" | |
def head(<<0x1F69B606::little-4*8, _::binary>>), do: "channels_togglesignatures" | |
def head(<<0xA72DED52::little-4*8, _::binary>>), do: "channels_updatepinnedmessage" | |
def head(<<0x8D8D82D7::little-4*8, _::binary>>), do: "channels_getadminedpublicchannels" | |
def head(<<0xA41AA5E4::little-4*8, _::binary>>), do: "phone_requestcall" | |
def head(<<0x220F0B20::little-4*8, _::binary>>), do: "phone_acceptcall" | |
def head(<<0x5DFBCDDC::little-4*8, _::binary>>), do: "phone_discardcall" | |
def head(<<0x17D54F61::little-4*8, _::binary>>), do: "phone_receivedcall" | |
def head(<<0x73F1F8DC::little-4*8, _::binary>>), do: "msg_container" | |
def head(_), do: "unknown" | |
# Extra | |
def req_pq, do: <<120, 151, 70, 96, :crypto.strong_rand_bytes(16)::binary>> | |
def messages_sendmessage(peer, message), do: <<122, 66, 136, 250, 0, 0, 0, 0, encode(peer)::binary, encode(:String, message)::binary, :crypto.strong_rand_bytes(8)::binary>> | |
def messages_sendmedia(peer, media), do: <<145, 103, 241, 200, 0, 0, 0, 0, encode(peer)::binary, encode(media)::binary, :crypto.strong_rand_bytes(8)::binary>> | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment