Class: MTProto::TL::UnpinAllMessages
- Inherits:
-
Object
- Object
- MTProto::TL::UnpinAllMessages
- Includes:
- Binary
- Defined in:
- lib/mtproto/tl/objects/unpin_all_messages.rb
Overview
messages.unpinAllMessages. Returns messages.AffectedHistory.
Constant Summary collapse
- CONSTRUCTOR =
0x062dd747
Instance Method Summary collapse
-
#initialize(peer:, top_msg_id: nil) ⇒ UnpinAllMessages
constructor
A new instance of UnpinAllMessages.
- #serialize ⇒ Object
Methods included from Binary
#b_u32, #b_u64, #u32_b, #u64_b
Constructor Details
#initialize(peer:, top_msg_id: nil) ⇒ UnpinAllMessages
Returns a new instance of UnpinAllMessages.
11 12 13 14 |
# File 'lib/mtproto/tl/objects/unpin_all_messages.rb', line 11 def initialize(peer:, top_msg_id: nil) @peer = peer @top_msg_id = top_msg_id end |
Instance Method Details
#serialize ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/mtproto/tl/objects/unpin_all_messages.rb', line 16 def serialize flags = 0 flags |= (1 << 0) unless @top_msg_id.nil? result = u32_b(CONSTRUCTOR) result += u32_b(flags) result += serialize_input_peer result += u32_b(@top_msg_id) unless @top_msg_id.nil? result end |