Skip to content

ChatList

ChatListItem[]

ChatListItem

Field Type Example Description
type ChatType "group" "dialog" | "group" | "channel" | "favorites" | "ai"
id string "JC0TvKi3f2bIQtBcW1jIn" The unique identifier for the chat item.
photoUrl? string "dev.big.a-kuznetsov.cc/public/de" Optional URL to the chat's photo.
name string "John Doe" The name of the chat.
username string "@JohnDoe" The name of the chat.
lastMessageText? string "Hello, World!" The text of the last message in the chat.
lastMessageTime? Date 1700000000000 The timestamp of the last message. Use Date for DateTime representation.
lastMessageAuthor? string "User1" Optional author of the last message.
lastMessageStatus? MessageStatus "read" "read" | "unread" | "undelivered" | "deleted"
missed? number 3 The count of missed messages in the chat.
firstMissed? string clientMessageId of first missed (unread)
verified? boolean true Indicates whether the chat is verified.
isMine? boolean true Indicates whether the chat item belongs to the current user.
lastMessageId? integer 123 The unique identifier for the last message in the chat.
lastSeen? integer 1700000000000 only for offline status
onlineHidden? boolean false if user hides his status
attachmentType? "file", "image", "video", "sticker", "voice", "contact", "geo" "file"
participantCount? number 5
payload? any c Assuming CallPayload can be any type for now
hidden? boolean false Hidden chat
isPinned? boolean false Chat is Pinned
isMuted? boolean false Chat is Muted
isMyContact? boolean false If it's a dialog with user from my Contacts
blockCalls? boolean false Does this chat blocks calls (without subscription)
blockMessages? boolean false Does this chat blocks messages (without subscription)
liked? boolean false if there are new reactions to user messages in chat
likedMessageId? number 10 Reference message ID
likedMessageText? string "Some text" Liked message text
likedAuthor? string "User1" Optional author of the last reaction.
mention? boolean false if there are new mentions of user in chat
mentionMessageId? number 11 Reference message ID
mentionAuthor? string "User1" Optional author who mentioned user

MessageStatus

"read" | "unread" | "undelivered"

lastSeen meaning

If no lastSeen - means that user (other dialog member) is Online \ lastSeen value = 1719781200000 - means that user's privacy does not allow current user to see his Online status upd: for users with hidden online status onlineHidden flag will be set to true

ChatType

"dialog" | "group" | "channel" | "favorites" | "ai"

ChatList example
  [
      {
          "type": "dialog",
          "id": "JC0TvKi3f2bIQtBcW1jIn",
          "lastMessageStatus": "unread",
          "photoUrl": "https://dev.big.a-kuznetsov.cc/public/de5d8114f9fa6bc906ca6972f9750d582b86bac94aadd0ee7550b2bd1a25b8607",
          "lastMessageText": "Hello, how are you?",
          "lastMessageTime": 1713437858000,
          "missed": 0,
          "name": "@JC0TvKi3f2bIQtBcW1jIn",
          "verified": false,
          "lastMessageAuthor": "",
          "isMine": true
      },
      {
          "type": "dialog",
          "id": "EiuOGJcrQoY0LjL2-FbtG",
          "photoUrl": "https://dev.big.a-kuznetsov.cc/public/de5d8114f9fa6bc906ca6972f9750d582b86bac94aadd0ee7550b2bd1a25b8604",
          "lastMessageStatus": "unread",
          "lastMessageText": "<string>",
          "lastMessageTime": 1713437858000,
          "missed": 0,
          "name": "Серёжа",
          "verified": false,
          "lastMessageAuthor": "Серёжа",
          "isMine": false
      }
  ]