Class: MTProto::TL::UpdateStatus

Inherits:
Object
  • Object
show all
Includes:
Binary
Defined in:
lib/mtproto/tl/objects/update_status.rb

Overview

account.updateStatus — mark the session online or offline. offline:false is what a foreground client sends to go online (and to start receiving transient updates like updateUserTyping). Returns Bool.

Constant Summary collapse

CONSTRUCTOR =
0x6628562c
BOOL_TRUE =
0x997275b5
BOOL_FALSE =
0xbc799737

Instance Method Summary collapse

Methods included from Binary

#b_u32, #b_u64, #u32_b, #u64_b

Constructor Details

#initialize(offline:) ⇒ UpdateStatus

Returns a new instance of UpdateStatus.



15
16
17
# File 'lib/mtproto/tl/objects/update_status.rb', line 15

def initialize(offline:)
  @offline = offline
end

Instance Method Details

#serializeObject



19
20
21
# File 'lib/mtproto/tl/objects/update_status.rb', line 19

def serialize
  u32_b(CONSTRUCTOR) + u32_b(@offline ? BOOL_TRUE : BOOL_FALSE)
end