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
:managed_bot user_id, bot_id
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
-
#bot_id ⇒ Object
Returns the value of attribute bot_id.
-
#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
#bot_id ⇒ Object
Returns the value of attribute bot_id
21 22 23 |
# File 'lib/mtproto/updates/event.rb', line 21 def bot_id @bot_id end |
#channel ⇒ Object
Returns the value of attribute channel
21 22 23 |
# File 'lib/mtproto/updates/event.rb', line 21 def channel @channel end |
#chats ⇒ Object
Returns the value of attribute chats
21 22 23 |
# File 'lib/mtproto/updates/event.rb', line 21 def chats @chats end |
#data ⇒ Object
Returns the value of attribute data
21 22 23 |
# File 'lib/mtproto/updates/event.rb', line 21 def data @data end |
#deleted_ids ⇒ Object
Returns the value of attribute deleted_ids
21 22 23 |
# File 'lib/mtproto/updates/event.rb', line 21 def deleted_ids @deleted_ids end |
#joined_user_id ⇒ Object
Returns the value of attribute joined_user_id
21 22 23 |
# File 'lib/mtproto/updates/event.rb', line 21 def joined_user_id @joined_user_id end |
#kind ⇒ Object
Returns the value of attribute kind
21 22 23 |
# File 'lib/mtproto/updates/event.rb', line 21 def kind @kind end |
#left_user_id ⇒ Object
Returns the value of attribute left_user_id
21 22 23 |
# File 'lib/mtproto/updates/event.rb', line 21 def left_user_id @left_user_id end |
#message ⇒ Object
Returns the value of attribute message
21 22 23 |
# File 'lib/mtproto/updates/event.rb', line 21 def @message end |
#msg_id ⇒ Object
Returns the value of attribute msg_id
21 22 23 |
# File 'lib/mtproto/updates/event.rb', line 21 def msg_id @msg_id end |
#peer_id ⇒ Object
Returns the value of attribute peer_id
21 22 23 |
# File 'lib/mtproto/updates/event.rb', line 21 def peer_id @peer_id end |
#peer_type ⇒ Object
Returns the value of attribute peer_type
21 22 23 |
# File 'lib/mtproto/updates/event.rb', line 21 def peer_type @peer_type end |
#pts ⇒ Object
Returns the value of attribute pts
21 22 23 |
# File 'lib/mtproto/updates/event.rb', line 21 def pts @pts end |
#pts_count ⇒ Object
Returns the value of attribute pts_count
21 22 23 |
# File 'lib/mtproto/updates/event.rb', line 21 def pts_count @pts_count end |
#qts ⇒ Object
Returns the value of attribute qts
21 22 23 |
# File 'lib/mtproto/updates/event.rb', line 21 def qts @qts end |
#query_id ⇒ Object
Returns the value of attribute query_id
21 22 23 |
# File 'lib/mtproto/updates/event.rb', line 21 def query_id @query_id end |
#reactors ⇒ Object
Returns the value of attribute reactors
21 22 23 |
# File 'lib/mtproto/updates/event.rb', line 21 def reactors @reactors end |
#user_id ⇒ Object
Returns the value of attribute user_id
21 22 23 |
# File 'lib/mtproto/updates/event.rb', line 21 def user_id @user_id end |
#users ⇒ Object
Returns the value of attribute users
21 22 23 |
# File 'lib/mtproto/updates/event.rb', line 21 def users @users end |