Class: MTProto::TL::AffectedHistory
- Inherits:
-
Object
- Object
- MTProto::TL::AffectedHistory
- Defined in:
- lib/mtproto/tl/objects/affected_history.rb
Overview
messages.affectedHistory — reply to bulk history operations (unpinAllMessages, deleteHistory, readHistory…). pts/pts_count advance the update state; a nonzero offset means the server processed only part of the range and the caller must repeat the request with the same arguments until offset reaches 0.
Constant Summary collapse
- CONSTRUCTOR =
0xb45c69d1
Instance Attribute Summary collapse
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
-
#pts ⇒ Object
readonly
Returns the value of attribute pts.
-
#pts_count ⇒ Object
readonly
Returns the value of attribute pts_count.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(pts:, pts_count:, offset:) ⇒ AffectedHistory
constructor
A new instance of AffectedHistory.
Constructor Details
#initialize(pts:, pts_count:, offset:) ⇒ AffectedHistory
Returns a new instance of AffectedHistory.
14 15 16 17 18 |
# File 'lib/mtproto/tl/objects/affected_history.rb', line 14 def initialize(pts:, pts_count:, offset:) @pts = pts @pts_count = pts_count @offset = offset end |
Instance Attribute Details
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
12 13 14 |
# File 'lib/mtproto/tl/objects/affected_history.rb', line 12 def offset @offset end |
#pts ⇒ Object (readonly)
Returns the value of attribute pts.
12 13 14 |
# File 'lib/mtproto/tl/objects/affected_history.rb', line 12 def pts @pts end |
#pts_count ⇒ Object (readonly)
Returns the value of attribute pts_count.
12 13 14 |
# File 'lib/mtproto/tl/objects/affected_history.rb', line 12 def pts_count @pts_count end |
Class Method Details
.deserialize(data) ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/mtproto/tl/objects/affected_history.rb', line 20 def self.deserialize(data) constructor = data[0, 4].unpack1('L<') raise UnexpectedConstructorError, constructor unless constructor == CONSTRUCTOR pts = data[4, 4].unpack1('l<') pts_count = data[8, 4].unpack1('l<') offset = data[12, 4].unpack1('l<') new(pts: pts, pts_count: pts_count, offset: offset) end |