Class: MTProto::TL::MessagesGetMessages
- Inherits:
-
Object
- Object
- MTProto::TL::MessagesGetMessages
- Includes:
- Binary
- Defined in:
- lib/mtproto/tl/objects/messages_get_messages.rb
Overview
messages.getMessages#63c66506 id:Vector<InputMessage> — fetch messages by id from a basic group or private chat (the non-channel counterpart of channels.getMessages). Returns messages.messages / messagesSlice.
Constant Summary collapse
- CONSTRUCTOR =
0x63c66506- INPUT_MESSAGE_ID =
0xa676a322
Instance Method Summary collapse
-
#initialize(ids:) ⇒ MessagesGetMessages
constructor
A new instance of MessagesGetMessages.
- #serialize ⇒ Object
Methods included from Binary
#b_u32, #b_u64, #u32_b, #u64_b
Constructor Details
#initialize(ids:) ⇒ MessagesGetMessages
Returns a new instance of MessagesGetMessages.
14 15 16 |
# File 'lib/mtproto/tl/objects/messages_get_messages.rb', line 14 def initialize(ids:) @ids = ids end |
Instance Method Details
#serialize ⇒ Object
18 19 20 21 22 23 |
# File 'lib/mtproto/tl/objects/messages_get_messages.rb', line 18 def serialize result = u32_b(CONSTRUCTOR) result += u32_b(Constructors::VECTOR) + u32_b(@ids.length) @ids.each { |id| result += u32_b(INPUT_MESSAGE_ID) + u32_b(id) } result end |