Layer 220
Dialog
Chat
constructor
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;
Parameters
| Name | Type | Description |
|---|---|---|
| Flags | # | Flags, see TL conditional fields |
| Pinned | flags.2?true | Is the dialog pinned |
| UnreadMark | flags.3?true | Whether the chat was manually marked as unread |
| ViewForumAsMessages | flags.6?true | 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. toggle View Forum As Messages method; invoking this method will update the value of this flag. |
| Peer | Peer | The chat |
| TopMessage | int | The latest message ID |
| ReadInboxMaxId | int | Position up to which all incoming messages are read. |
| ReadOutboxMaxId | int | Position up to which all outgoing messages are read. |
| UnreadCount | int | Number of unread messages |
| UnreadMentionsCount | int | Number of unread mentions |
| UnreadReactionsCount | int | Number of unread reactions to messages you sent |
| NotifySettings | PeerNotifySettings | Notification settings |
| Pts | flags.0?int | PTS |
| Draft | flags.1?DraftMessage | Message draft |
| FolderId | flags.4?int | Peer folder ID, for more info click here |
| TtlPeriod | flags.5?int | Time-to-live of all messages sent in this dialog |
Returns
DialogGogram Example
// Creating Dialog constructor obj := &tg.Dialog{ Peer: &tg.Peer{}, TopMessage: 0, ReadInboxMaxId: 0, ReadOutboxMaxId: 0, UnreadCount: 0, UnreadMentionsCount: 0, // ... more required fields // Optional fields: // Pinned: true, // UnreadMark: true, // ViewForumAsMessages: true, // Pts: 0, // ... more optional fields }