Class: MTProto::Updates::Event
- Inherits:
-
Struct
- Object
- Struct
- MTProto::Updates::Event
- Defined in:
- lib/mtproto/updates/event.rb
Overview
One normalized update the state machine emits, unified across the live push
and the getDifference/getChannelDifference recovery paths so a host sees one
shape however an update arrived. kind selects which payload fields are set:
:message / :edit message (TL::Message#to_h)
:join joined_user_id
:leave left_user_id
:reaction / :unreaction msg_id, reactors
:delete deleted_ids
:callback query_id, user_id, data, msg_id
:guest_query query_id, message, qts
pts/pts_count/channel drive ordering and gap detection; they are nil for
updates outside the pts sequence (e.g. getDifference's common new_messages,
which the protocol delivers without a per-message pts). users/chats are the
peers that rode in the same batch (shared by reference) — the access_hash source
a host caches and enriches from.
Instance Attribute Summary collapse
-
#channel ⇒ Object
Returns the value of attribute channel.
-
#chats ⇒ Object
Returns the value of attribute chats.
-
#data ⇒ Object
Returns the value of attribute data.
-
#deleted_ids ⇒ Object
Returns the value of attribute deleted_ids.
-
#joined_user_id ⇒ Object
Returns the value of attribute joined_user_id.
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#left_user_id ⇒ Object
Returns the value of attribute left_user_id.
-
#message ⇒ Object
Returns the value of attribute message.
-
#msg_id ⇒ Object
Returns the value of attribute msg_id.
-
#peer_id ⇒ Object
Returns the value of attribute peer_id.
-
#peer_type ⇒ Object
Returns the value of attribute peer_type.
-
#pts ⇒ Object
Returns the value of attribute pts.
-
#pts_count ⇒ Object
Returns the value of attribute pts_count.
-
#qts ⇒ Object
Returns the value of attribute qts.
-
#query_id ⇒ Object
Returns the value of attribute query_id.
-
#reactors ⇒ Object
Returns the value of attribute reactors.
-
#user_id ⇒ Object
Returns the value of attribute user_id.
-
#users ⇒ Object
Returns the value of attribute users.
Instance Attribute Details
#channel ⇒ Object
Returns the value of attribute channel
20 21 22 |
# File 'lib/mtproto/updates/event.rb', line 20 def channel @channel end |
#chats ⇒ Object
Returns the value of attribute chats
20 21 22 |
# File 'lib/mtproto/updates/event.rb', line 20 def chats @chats end |
#data ⇒ Object
Returns the value of attribute data
20 21 22 |
# File 'lib/mtproto/updates/event.rb', line 20 def data @data end |
#deleted_ids ⇒ Object
Returns the value of attribute deleted_ids
20 21 22 |
# File 'lib/mtproto/updates/event.rb', line 20 def deleted_ids @deleted_ids end |
#joined_user_id ⇒ Object
Returns the value of attribute joined_user_id
20 21 22 |
# File 'lib/mtproto/updates/event.rb', line 20 def joined_user_id @joined_user_id end |
#kind ⇒ Object
Returns the value of attribute kind
20 21 22 |
# File 'lib/mtproto/updates/event.rb', line 20 def kind @kind end |
#left_user_id ⇒ Object
Returns the value of attribute left_user_id
20 21 22 |
# File 'lib/mtproto/updates/event.rb', line 20 def left_user_id @left_user_id end |
#message ⇒ Object
Returns the value of attribute message
20 21 22 |
# File 'lib/mtproto/updates/event.rb', line 20 def @message end |
#msg_id ⇒ Object
Returns the value of attribute msg_id
20 21 22 |
# File 'lib/mtproto/updates/event.rb', line 20 def msg_id @msg_id end |
#peer_id ⇒ Object
Returns the value of attribute peer_id
20 21 22 |
# File 'lib/mtproto/updates/event.rb', line 20 def peer_id @peer_id end |
#peer_type ⇒ Object
Returns the value of attribute peer_type
20 21 22 |
# File 'lib/mtproto/updates/event.rb', line 20 def peer_type @peer_type end |
#pts ⇒ Object
Returns the value of attribute pts
20 21 22 |
# File 'lib/mtproto/updates/event.rb', line 20 def pts @pts end |
#pts_count ⇒ Object
Returns the value of attribute pts_count
20 21 22 |
# File 'lib/mtproto/updates/event.rb', line 20 def pts_count @pts_count end |
#qts ⇒ Object
Returns the value of attribute qts
20 21 22 |
# File 'lib/mtproto/updates/event.rb', line 20 def qts @qts end |
#query_id ⇒ Object
Returns the value of attribute query_id
20 21 22 |
# File 'lib/mtproto/updates/event.rb', line 20 def query_id @query_id end |
#reactors ⇒ Object
Returns the value of attribute reactors
20 21 22 |
# File 'lib/mtproto/updates/event.rb', line 20 def reactors @reactors end |
#user_id ⇒ Object
Returns the value of attribute user_id
20 21 22 |
# File 'lib/mtproto/updates/event.rb', line 20 def user_id @user_id end |
#users ⇒ Object
Returns the value of attribute users
20 21 22 |
# File 'lib/mtproto/updates/event.rb', line 20 def users @users end |