Link Search Menu Expand Document

Constructor: dialog

Back to constructors index

Chat

Attributes:

NameTypeRequiredDescription
pinnedBoolOptionalIs the dialog pinned
unread_markBoolOptionalWhether the chat was manually marked as unread
view_forum_as_messagesBoolOptionalUsers may also choose to display messages from all topics of a forum as if they were sent to a normal group, using a “View as messages” setting in the local client.
This setting only affects the current account, and is synced to other logged in sessions using the channels.toggleViewForumAsMessages method; invoking this method will update the value of this flag.
peerlongYesThe chat
top_messageintYesThe latest message ID
read_inbox_max_idintYesPosition up to which all incoming messages are read.
read_outbox_max_idintYesPosition up to which all outgoing messages are read.
unread_countintYesNumber of unread messages
unread_mentions_countintYesNumber of unread mentions
unread_reactions_countintYesNumber of unread reactions to messages you sent
notify_settingsPeerNotifySettingsYesNotification settings
ptsintOptionalPTS
draftDraftMessageOptionalMessage draft
folder_idintOptionalPeer folder ID, for more info click here
ttl_periodintOptionalTime-to-live of all messages sent in this dialog

Type: Dialog

Example:

$dialog = ['_' => 'dialog', 'pinned' => Bool, 'unread_mark' => Bool, 'view_forum_as_messages' => Bool, 'peer' => long, 'top_message' => int, 'read_inbox_max_id' => int, 'read_outbox_max_id' => int, 'unread_count' => int, 'unread_mentions_count' => int, 'unread_reactions_count' => int, 'notify_settings' => PeerNotifySettings, 'pts' => int, 'draft' => DraftMessage, 'folder_id' => int, 'ttl_period' => int];