Dialog

class pyrogram.raw.types.Dialog

Chat

Constructor of Dialog.

Details:
  • Layer: 223

  • ID: D58A08C6

Parameters:
  • peer (Peer) – The chat

  • top_message (int 32-bit) – The latest message ID

  • read_inbox_max_id (int 32-bit) – Position up to which all incoming messages are read.

  • read_outbox_max_id (int 32-bit) – Position up to which all outgoing messages are read.

  • unread_count (int 32-bit) – Number of unread messages

  • unread_mentions_count (int 32-bit) – Number of unread mentions

  • unread_reactions_count (int 32-bit) – Number of unread reactions to messages you sent

  • notify_settings (PeerNotifySettings) – Notification settings

  • pinned (bool, optional) – Is the dialog pinned

  • unread_mark (bool, optional) – Whether the chat was manually marked as unread

  • view_forum_as_messages (bool, optional) – Users 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.

  • pts (int 32-bit, optional) – PTS

  • draft (DraftMessage, optional) – Message draft

  • folder_id (int 32-bit, optional) – Peer folder ID, for more info click here

  • ttl_period (int 32-bit, optional) – Time-to-live of all messages sent in this dialog

TL Schema

dialog#d58a08c6
flags:#
pinned:flags.2?true
unread_mark:flags.3?true
view_forum_as_messages:flags.6?true
peer:Peer
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:flags.0?int
draft:flags.1?DraftMessage
folder_id:flags.4?int
ttl_period:flags.5?int

= Dialog

Parameter Tree

Dialog
├── pinnedtrue (optional)
├── unread_marktrue (optional)
├── view_forum_as_messagestrue (optional)
├── peerPeer
│ ├── PeerUser
│ │ └── user_idlong
│ ├── PeerChat
│ │ └── chat_idlong
│ └── PeerChannel
│ └── channel_idlong
├── top_messageint
├── read_inbox_max_idint
├── read_outbox_max_idint
├── unread_countint
├── unread_mentions_countint
├── unread_reactions_countint
├── notify_settingsPeerNotifySettings
│ └── PeerNotifySettings
│ ├── show_previewsBool (optional)
│ ├── silentBool (optional)
│ ├── mute_untilint (optional)
│ ├── ios_soundNotificationSound (optional)
│ │ ├── NotificationSoundDefault
│ │ ├── NotificationSoundNone
│ │ ├── NotificationSoundLocal
│ │ │ ├── titlestring
│ │ │ └── datastring
│ │ └── NotificationSoundRingtone
│ │ └── idlong
│ ├── android_soundNotificationSound (optional)
│ │ ├── NotificationSoundDefault
│ │ ├── NotificationSoundNone
│ │ ├── NotificationSoundLocal
│ │ │ ├── titlestring
│ │ │ └── datastring
│ │ └── NotificationSoundRingtone
│ │ └── idlong
│ ├── other_soundNotificationSound (optional)
│ │ ├── NotificationSoundDefault
│ │ ├── NotificationSoundNone
│ │ ├── NotificationSoundLocal
│ │ │ ├── titlestring
│ │ │ └── datastring
│ │ └── NotificationSoundRingtone
│ │ └── idlong
│ ├── stories_mutedBool (optional)
│ ├── stories_hide_senderBool (optional)
│ ├── stories_ios_soundNotificationSound (optional)
│ │ ├── NotificationSoundDefault
│ │ ├── NotificationSoundNone
│ │ ├── NotificationSoundLocal
│ │ │ ├── titlestring
│ │ │ └── datastring
│ │ └── NotificationSoundRingtone
│ │ └── idlong
│ ├── stories_android_soundNotificationSound (optional)
│ │ ├── NotificationSoundDefault
│ │ ├── NotificationSoundNone
│ │ ├── NotificationSoundLocal
│ │ │ ├── titlestring
│ │ │ └── datastring
│ │ └── NotificationSoundRingtone
│ │ └── idlong
│ └── stories_other_soundNotificationSound (optional)
│ ├── NotificationSoundNone
│ │ ├── titlestring
│ │ └── datastring
│ └── idlong
├── ptsint (optional)
├── draftDraftMessage (optional)
│ ├── DraftMessageEmpty
│ │ └── dateint (optional)
│ └── DraftMessage
│ ├── no_webpagetrue (optional)
│ ├── invert_mediatrue (optional)
│ ├── reply_toInputReplyTo (optional)
│ │ ├── InputReplyToMessage
│ │ │ ├── reply_to_msg_idint
│ │ │ ├── top_msg_idint (optional)
│ │ │ ├── reply_to_peer_idInputPeer (optional)
│ │ │ │ ├── InputPeerEmpty
│ │ │ │ ├── InputPeerSelf
│ │ │ │ ├── InputPeerChat
│ │ │ │ ├── InputPeerUser
│ │ │ │ ├── InputPeerChannel
│ │ │ │ ├── InputPeerUserFromMessage
│ │ │ │ └── InputPeerChannelFromMessage
│ │ │ ├── quote_textstring (optional)
│ │ │ ├── quote_entitiesVector < MessageEntity > (optional)
│ │ │ │ ├── MessageEntityUnknown
│ │ │ │ ├── MessageEntityMention
│ │ │ │ ├── MessageEntityHashtag
│ │ │ │ ├── MessageEntityBotCommand
│ │ │ │ ├── MessageEntityUrl
│ │ │ │ ├── MessageEntityEmail
│ │ │ │ ├── MessageEntityBold
│ │ │ │ ├── MessageEntityItalic
│ │ │ │ ├── MessageEntityCode
│ │ │ │ ├── MessageEntityPre
│ │ │ │ ├── MessageEntityTextUrl
│ │ │ │ ├── MessageEntityMentionName
│ │ │ │ ├── InputMessageEntityMentionName
│ │ │ │ ├── MessageEntityPhone
│ │ │ │ ├── MessageEntityCashtag
│ │ │ │ ├── MessageEntityUnderline
│ │ │ │ ├── MessageEntityStrike
│ │ │ │ ├── MessageEntityBankCard
│ │ │ │ ├── MessageEntitySpoiler
│ │ │ │ ├── MessageEntityCustomEmoji
│ │ │ │ ├── MessageEntityBlockquote
│ │ │ │ └── MessageEntityFormattedDate
│ │ │ ├── quote_offsetint (optional)
│ │ │ ├── monoforum_peer_idInputPeer (optional)
│ │ │ │ ├── InputPeerEmpty
│ │ │ │ ├── InputPeerSelf
│ │ │ │ ├── InputPeerChat
│ │ │ │ ├── InputPeerUser
│ │ │ │ ├── InputPeerChannel
│ │ │ │ ├── InputPeerUserFromMessage
│ │ │ │ └── InputPeerChannelFromMessage
│ │ │ └── todo_item_idint (optional)
│ │ ├── InputReplyToStory
│ │ │ ├── peerInputPeer
│ │ │ │ ├── InputPeerEmpty
│ │ │ │ ├── InputPeerSelf
│ │ │ │ ├── InputPeerChat
│ │ │ │ ├── InputPeerUser
│ │ │ │ ├── InputPeerChannel
│ │ │ │ ├── InputPeerUserFromMessage
│ │ │ │ └── InputPeerChannelFromMessage
│ │ │ └── story_idint
│ │ └── InputReplyToMonoForum
│ │ └── monoforum_peer_idInputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── messagestring
│ ├── entitiesVector < MessageEntity > (optional)
│ │ ├── MessageEntityUnknown
│ │ │ ├── offsetint
│ │ │ └── lengthint
│ │ ├── MessageEntityMention
│ │ │ ├── offsetint
│ │ │ └── lengthint
│ │ ├── MessageEntityHashtag
│ │ │ ├── offsetint
│ │ │ └── lengthint
│ │ ├── MessageEntityBotCommand
│ │ │ ├── offsetint
│ │ │ └── lengthint
│ │ ├── MessageEntityUrl
│ │ │ ├── offsetint
│ │ │ └── lengthint
│ │ ├── MessageEntityEmail
│ │ │ ├── offsetint
│ │ │ └── lengthint
│ │ ├── MessageEntityBold
│ │ │ ├── offsetint
│ │ │ └── lengthint
│ │ ├── MessageEntityItalic
│ │ │ ├── offsetint
│ │ │ └── lengthint
│ │ ├── MessageEntityCode
│ │ │ ├── offsetint
│ │ │ └── lengthint
│ │ ├── MessageEntityPre
│ │ │ ├── offsetint
│ │ │ ├── lengthint
│ │ │ └── languagestring
│ │ ├── MessageEntityTextUrl
│ │ │ ├── offsetint
│ │ │ ├── lengthint
│ │ │ └── urlstring
│ │ ├── MessageEntityMentionName
│ │ │ ├── offsetint
│ │ │ ├── lengthint
│ │ │ └── user_idlong
│ │ │ ├── offsetint
│ │ │ ├── lengthint
│ │ │ └── user_idInputUser
│ │ │ ├── InputUserEmpty
│ │ │ ├── InputUserSelf
│ │ │ ├── InputUser
│ │ │ └── InputUserFromMessage
│ │ ├── MessageEntityPhone
│ │ │ ├── offsetint
│ │ │ └── lengthint
│ │ ├── MessageEntityCashtag
│ │ │ ├── offsetint
│ │ │ └── lengthint
│ │ ├── MessageEntityUnderline
│ │ │ ├── offsetint
│ │ │ └── lengthint
│ │ ├── MessageEntityStrike
│ │ │ ├── offsetint
│ │ │ └── lengthint
│ │ ├── MessageEntityBankCard
│ │ │ ├── offsetint
│ │ │ └── lengthint
│ │ ├── MessageEntitySpoiler
│ │ │ ├── offsetint
│ │ │ └── lengthint
│ │ ├── MessageEntityCustomEmoji
│ │ │ ├── offsetint
│ │ │ ├── lengthint
│ │ │ └── document_idlong
│ │ ├── MessageEntityBlockquote
│ │ │ ├── collapsedtrue (optional)
│ │ │ ├── offsetint
│ │ │ └── lengthint
│ │ └── MessageEntityFormattedDate
│ │ ├── relativetrue (optional)
│ │ ├── short_timetrue (optional)
│ │ ├── long_timetrue (optional)
│ │ ├── short_datetrue (optional)
│ │ ├── long_datetrue (optional)
│ │ ├── day_of_weektrue (optional)
│ │ ├── offsetint
│ │ ├── lengthint
│ │ └── dateint
│ ├── mediaInputMedia (optional)
│ │ ├── InputMediaEmpty
│ │ ├── InputMediaUploadedPhoto
│ │ ├── InputMediaPhoto
│ │ ├── InputMediaGeoPoint
│ │ ├── InputMediaContact
│ │ ├── InputMediaUploadedDocument
│ │ ├── InputMediaDocument
│ │ ├── InputMediaVenue
│ │ ├── InputMediaPhotoExternal
│ │ ├── InputMediaDocumentExternal
│ │ ├── InputMediaGame
│ │ ├── InputMediaInvoice
│ │ ├── InputMediaGeoLive
│ │ ├── InputMediaPoll
│ │ ├── InputMediaDice
│ │ ├── InputMediaStory
│ │ ├── InputMediaWebPage
│ │ ├── InputMediaPaidMedia
│ │ ├── InputMediaTodo
│ │ └── InputMediaStakeDice
│ ├── dateint
│ ├── effectlong (optional)
│ └── suggested_postSuggestedPost (optional)
│ └── SuggestedPost
│ ├── acceptedtrue (optional)
│ ├── rejectedtrue (optional)
│ ├── priceStarsAmount (optional)
│ │ ├── StarsAmount
│ │ └── StarsTonAmount
│ └── schedule_dateint (optional)
├── folder_idint (optional)
└── ttl_periodint (optional)

Example

Dialog(
    peer=PeerUser(user_id=0),
    top_message=0,
    read_inbox_max_id=0,
    read_outbox_max_id=0,
    unread_count=0,
    unread_mentions_count=0,
    unread_reactions_count=0,
    notify_settings=PeerNotifySettings(),
)