Chat object

This object represents a single chat of a WhatsApp client, ie a conversation with a single user or with a group.

This description will show the fields of chat object.

Field

Type

Description

_id

string

object id

instance_number

string

number of instance like instance_whatsapp.istance_number

last_message_time

number

unix timestamp in seconds like message.time ; is the time of the last message received or sent in this chat

last_message_number

number

the number of the last message received or sent in this chat; like message.messageNumber

last_message_number_id

string

the _id of the last message received or sent in this chat; like message._id

count_message_read

number

number of message unread

chatId

string

id of the chat. Example: 1493046918@g.us

name

string

name of the chat.

image

string

HTTPS link on avatar or group image.

metadata

object

Object whit with the following fields: - isGroup: boolean, if true the chat is a group - partecipants: array, it the chat is a group so the array contains the chatId (like chat.chatId) of the partecipants - groupInviteLink: string, link for group invitation