Dialog

class pyrogram.raw.types.Dialog

Chat

Constructor of Dialog.

Details:
  • Layer: 227

  • ID: FC89F7F3

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

  • unread_poll_votes_count (int 32-bit) – N/A

  • 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#fc89f7f3
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
unread_poll_votes_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
├── pinned → true (optional)
├── unread_mark → true (optional)
├── view_forum_as_messages → true (optional)
├── peer → Peer
│ ├── PeerUser
│ │ └── user_id → long
│ ├── PeerChat
│ │ └── chat_id → long
│ └── PeerChannel
│ └── channel_id → 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
├── unread_poll_votes_count → int
├── notify_settings → PeerNotifySettings
│ └── PeerNotifySettings
│ ├── show_previews → Bool (optional)
│ ├── silent → Bool (optional)
│ ├── mute_until → int (optional)
│ ├── ios_sound → NotificationSound (optional)
│ │ ├── NotificationSoundDefault
│ │ ├── NotificationSoundNone
│ │ ├── NotificationSoundLocal
│ │ │ ├── title → string
│ │ │ └── data → string
│ │ └── NotificationSoundRingtone
│ │ └── id → long
│ ├── android_sound → NotificationSound (optional)
│ │ ├── NotificationSoundDefault
│ │ ├── NotificationSoundNone
│ │ ├── NotificationSoundLocal
│ │ │ ├── title → string
│ │ │ └── data → string
│ │ └── NotificationSoundRingtone
│ │ └── id → long
│ ├── other_sound → NotificationSound (optional)
│ │ ├── NotificationSoundDefault
│ │ ├── NotificationSoundNone
│ │ ├── NotificationSoundLocal
│ │ │ ├── title → string
│ │ │ └── data → string
│ │ └── NotificationSoundRingtone
│ │ └── id → long
│ ├── stories_muted → Bool (optional)
│ ├── stories_hide_sender → Bool (optional)
│ ├── stories_ios_sound → NotificationSound (optional)
│ │ ├── NotificationSoundDefault
│ │ ├── NotificationSoundNone
│ │ ├── NotificationSoundLocal
│ │ │ ├── title → string
│ │ │ └── data → string
│ │ └── NotificationSoundRingtone
│ │ └── id → long
│ ├── stories_android_sound → NotificationSound (optional)
│ │ ├── NotificationSoundDefault
│ │ ├── NotificationSoundNone
│ │ ├── NotificationSoundLocal
│ │ │ ├── title → string
│ │ │ └── data → string
│ │ └── NotificationSoundRingtone
│ │ └── id → long
│ └── stories_other_sound → NotificationSound (optional)
│ ├── NotificationSoundNone
│ │ ├── title → string
│ │ └── data → string
│ └── id → long
├── pts → int (optional)
├── draft → DraftMessage (optional)
│ ├── DraftMessageEmpty
│ │ └── date → int (optional)
│ └── DraftMessage
│ ├── no_webpage → true (optional)
│ ├── invert_media → true (optional)
│ ├── reply_to → InputReplyTo (optional)
│ │ ├── InputReplyToMessage
│ │ │ ├── reply_to_msg_id → int
│ │ │ ├── top_msg_id → int (optional)
│ │ │ ├── reply_to_peer_id → InputPeer (optional)
│ │ │ │ ├── InputPeerEmpty
│ │ │ │ ├── InputPeerSelf
│ │ │ │ ├── InputPeerChat
│ │ │ │ ├── InputPeerUser
│ │ │ │ ├── InputPeerChannel
│ │ │ │ ├── InputPeerUserFromMessage
│ │ │ │ └── InputPeerChannelFromMessage
│ │ │ ├── quote_text → string (optional)
│ │ │ ├── quote_entities → Vector < MessageEntity > (optional)
│ │ │ │ ├── MessageEntityUnknown
│ │ │ │ ├── MessageEntityMention
│ │ │ │ ├── MessageEntityHashtag
│ │ │ │ ├── MessageEntityBotCommand
│ │ │ │ ├── MessageEntityUrl
│ │ │ │ ├── MessageEntityEmail
│ │ │ │ ├── MessageEntityBold
│ │ │ │ ├── MessageEntityItalic
│ │ │ │ ├── MessageEntityCode
│ │ │ │ ├── MessageEntityPre
│ │ │ │ ├── MessageEntityTextUrl
│ │ │ │ ├── MessageEntityMentionName
│ │ │ │ ├── InputMessageEntityMentionName
│ │ │ │ ├── MessageEntityPhone
│ │ │ │ ├── MessageEntityCashtag
│ │ │ │ ├── MessageEntityUnderline
│ │ │ │ ├── MessageEntityStrike
│ │ │ │ ├── MessageEntityBankCard
│ │ │ │ ├── MessageEntitySpoiler
│ │ │ │ ├── MessageEntityCustomEmoji
│ │ │ │ ├── MessageEntityBlockquote
│ │ │ │ ├── MessageEntityFormattedDate
│ │ │ │ ├── MessageEntityDiffInsert
│ │ │ │ ├── MessageEntityDiffReplace
│ │ │ │ └── MessageEntityDiffDelete
│ │ │ ├── quote_offset → int (optional)
│ │ │ ├── monoforum_peer_id → InputPeer (optional)
│ │ │ │ ├── InputPeerEmpty
│ │ │ │ ├── InputPeerSelf
│ │ │ │ ├── InputPeerChat
│ │ │ │ ├── InputPeerUser
│ │ │ │ ├── InputPeerChannel
│ │ │ │ ├── InputPeerUserFromMessage
│ │ │ │ └── InputPeerChannelFromMessage
│ │ │ ├── todo_item_id → int (optional)
│ │ │ └── poll_option → bytes (optional)
│ │ ├── InputReplyToStory
│ │ │ ├── peer → InputPeer
│ │ │ │ ├── InputPeerEmpty
│ │ │ │ ├── InputPeerSelf
│ │ │ │ ├── InputPeerChat
│ │ │ │ ├── InputPeerUser
│ │ │ │ ├── InputPeerChannel
│ │ │ │ ├── InputPeerUserFromMessage
│ │ │ │ └── InputPeerChannelFromMessage
│ │ │ └── story_id → int
│ │ └── InputReplyToMonoForum
│ │ └── monoforum_peer_id → InputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── message → string
│ ├── entities → Vector < MessageEntity > (optional)
│ │ ├── MessageEntityUnknown
│ │ │ ├── offset → int
│ │ │ └── length → int
│ │ ├── MessageEntityMention
│ │ │ ├── offset → int
│ │ │ └── length → int
│ │ ├── MessageEntityHashtag
│ │ │ ├── offset → int
│ │ │ └── length → int
│ │ ├── MessageEntityBotCommand
│ │ │ ├── offset → int
│ │ │ └── length → int
│ │ ├── MessageEntityUrl
│ │ │ ├── offset → int
│ │ │ └── length → int
│ │ ├── MessageEntityEmail
│ │ │ ├── offset → int
│ │ │ └── length → int
│ │ ├── MessageEntityBold
│ │ │ ├── offset → int
│ │ │ └── length → int
│ │ ├── MessageEntityItalic
│ │ │ ├── offset → int
│ │ │ └── length → int
│ │ ├── MessageEntityCode
│ │ │ ├── offset → int
│ │ │ └── length → int
│ │ ├── MessageEntityPre
│ │ │ ├── offset → int
│ │ │ ├── length → int
│ │ │ └── language → string
│ │ ├── MessageEntityTextUrl
│ │ │ ├── offset → int
│ │ │ ├── length → int
│ │ │ └── url → string
│ │ ├── MessageEntityMentionName
│ │ │ ├── offset → int
│ │ │ ├── length → int
│ │ │ └── user_id → long
│ │ │ ├── offset → int
│ │ │ ├── length → int
│ │ │ └── user_id → InputUser
│ │ │ ├── InputUserEmpty
│ │ │ ├── InputUserSelf
│ │ │ ├── InputUser
│ │ │ └── InputUserFromMessage
│ │ ├── MessageEntityPhone
│ │ │ ├── offset → int
│ │ │ └── length → int
│ │ ├── MessageEntityCashtag
│ │ │ ├── offset → int
│ │ │ └── length → int
│ │ ├── MessageEntityUnderline
│ │ │ ├── offset → int
│ │ │ └── length → int
│ │ ├── MessageEntityStrike
│ │ │ ├── offset → int
│ │ │ └── length → int
│ │ ├── MessageEntityBankCard
│ │ │ ├── offset → int
│ │ │ └── length → int
│ │ ├── MessageEntitySpoiler
│ │ │ ├── offset → int
│ │ │ └── length → int
│ │ ├── MessageEntityCustomEmoji
│ │ │ ├── offset → int
│ │ │ ├── length → int
│ │ │ └── document_id → long
│ │ ├── MessageEntityBlockquote
│ │ │ ├── collapsed → true (optional)
│ │ │ ├── offset → int
│ │ │ └── length → int
│ │ ├── MessageEntityFormattedDate
│ │ │ ├── relative → true (optional)
│ │ │ ├── short_time → true (optional)
│ │ │ ├── long_time → true (optional)
│ │ │ ├── short_date → true (optional)
│ │ │ ├── long_date → true (optional)
│ │ │ ├── day_of_week → true (optional)
│ │ │ ├── offset → int
│ │ │ ├── length → int
│ │ │ └── date → int
│ │ ├── MessageEntityDiffInsert
│ │ │ ├── offset → int
│ │ │ └── length → int
│ │ ├── MessageEntityDiffReplace
│ │ │ ├── offset → int
│ │ │ ├── length → int
│ │ │ └── old_text → string
│ │ └── MessageEntityDiffDelete
│ │ ├── offset → int
│ │ └── length → int
│ ├── media → InputMedia (optional)
│ │ ├── InputMediaEmpty
│ │ ├── InputMediaUploadedPhoto
│ │ ├── InputMediaPhoto
│ │ ├── InputMediaGeoPoint
│ │ ├── InputMediaContact
│ │ ├── InputMediaUploadedDocument
│ │ ├── InputMediaDocument
│ │ ├── InputMediaVenue
│ │ ├── InputMediaPhotoExternal
│ │ ├── InputMediaDocumentExternal
│ │ ├── InputMediaGame
│ │ ├── InputMediaInvoice
│ │ ├── InputMediaGeoLive
│ │ ├── InputMediaPoll
│ │ ├── InputMediaDice
│ │ ├── InputMediaStory
│ │ ├── InputMediaWebPage
│ │ ├── InputMediaPaidMedia
│ │ ├── InputMediaTodo
│ │ └── InputMediaStakeDice
│ ├── date → int
│ ├── effect → long (optional)
│ ├── suggested_post → SuggestedPost (optional)
│ │ └── SuggestedPost
│ │ ├── accepted → true (optional)
│ │ ├── rejected → true (optional)
│ │ ├── price → StarsAmount (optional)
│ │ │ ├── StarsAmount
│ │ │ └── StarsTonAmount
│ │ └── schedule_date → int (optional)
│ └── rich_message → RichMessage (optional)
│ └── RichMessage
│ ├── rtl → true (optional)
│ ├── part → true (optional)
│ ├── blocks → Vector < PageBlock >
│ │ ├── PageBlockUnsupported
│ │ ├── PageBlockTitle
│ │ ├── PageBlockSubtitle
│ │ ├── PageBlockAuthorDate
│ │ ├── PageBlockHeader
│ │ ├── PageBlockSubheader
│ │ ├── PageBlockParagraph
│ │ ├── PageBlockPreformatted
│ │ ├── PageBlockFooter
│ │ ├── PageBlockDivider
│ │ ├── PageBlockAnchor
│ │ ├── PageBlockList
│ │ ├── PageBlockBlockquote
│ │ ├── PageBlockPullquote
│ │ ├── PageBlockPhoto
│ │ ├── PageBlockVideo
│ │ ├── PageBlockCover
│ │ ├── PageBlockEmbed
│ │ ├── PageBlockEmbedPost
│ │ ├── PageBlockCollage
│ │ ├── PageBlockSlideshow
│ │ ├── PageBlockChannel
│ │ ├── PageBlockAudio
│ │ ├── PageBlockKicker
│ │ ├── PageBlockTable
│ │ ├── PageBlockOrderedList
│ │ ├── PageBlockDetails
│ │ ├── PageBlockRelatedArticles
│ │ ├── PageBlockMap
│ │ ├── PageBlockHeading1
│ │ ├── PageBlockHeading2
│ │ ├── PageBlockHeading3
│ │ ├── PageBlockHeading4
│ │ ├── PageBlockHeading5
│ │ ├── PageBlockHeading6
│ │ ├── PageBlockMath
│ │ ├── PageBlockThinking
│ │ ├── InputPageBlockMap
│ │ └── PageBlockBlockquoteBlocks
│ ├── photos → Vector < Photo >
│ │ ├── PhotoEmpty
│ │ └── Photo
│ └── documents → Vector < Document >
│ ├── DocumentEmpty
│ └── Document
├── folder_id → int (optional)
└── ttl_period → int (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,
    unread_poll_votes_count=0,
    notify_settings=PeerNotifySettings(),
)