Class: MTProto::TL::ChannelsReportSpam
- Inherits:
-
Object
- Object
- MTProto::TL::ChannelsReportSpam
- Includes:
- Binary
- Defined in:
- lib/mtproto/tl/objects/channels_report_spam.rb
Constant Summary collapse
- CONSTRUCTOR =
0xf44a8315
Instance Method Summary collapse
-
#initialize(channel:, participant:, ids:) ⇒ ChannelsReportSpam
constructor
A new instance of ChannelsReportSpam.
- #serialize ⇒ Object
Methods included from Binary
#b_u32, #b_u64, #u32_b, #u64_b
Constructor Details
#initialize(channel:, participant:, ids:) ⇒ ChannelsReportSpam
Returns a new instance of ChannelsReportSpam.
10 11 12 13 14 |
# File 'lib/mtproto/tl/objects/channels_report_spam.rb', line 10 def initialize(channel:, participant:, ids:) @channel = channel @participant = participant @ids = ids end |
Instance Method Details
#serialize ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/mtproto/tl/objects/channels_report_spam.rb', line 16 def serialize result = u32_b(CONSTRUCTOR) result += u32_b(Constructors::INPUT_CHANNEL) + u64_b(@channel[:id]) + u64_b(@channel[:access_hash]) result += serialize_input_peer(@participant) result += u32_b(Constructors::VECTOR) + u32_b(@ids.length) @ids.each { |id| result += u32_b(id) } result end |