[Feature Request] Add profile picture object be included in the GET /api/{session}/chats endpoint response
Is your feature request related to a problem? Please describe. I'm always frustrated when facing timeouts when trying to fetch profile pictures separately using the GET /api/contacts/profile-picture?contactId= endpoint in a loop.
** A clear and concise description of what the problem is. I would like to add a profile picture url object in the GET /api/{session}/chats endpoint response. For example:
[{
"id": "[email protected]",
"readOnly": false,
"ephemeralExpiration": 0,
"ephemeralSettingTimestamp": 0,
"conversationTimestamp": 1726799908,
"name": "Contoh",
"profilePictureUrl": "....",
...
}]
+1
Added in 2024.12.6 :rocket:
https://waha.devlike.pro/docs/how-to/chats/#get-chats-overview
Get chats overview
Get chats "overview" - the API that almost all Chat UI client needs!
GET /api/{session}/chats/overview?limit=20&offset=0
Response contains the main info you need to show in the chat list:
-
id- chat id -
name- chat name (if any) -
picture- chat picture (if any) -
lastMessage- last message in the chat (if any). -
_chat- the structure depends on engine you're using
⚠️ lastMessage doesn't have media attachments, you need to [get message by id]({{< relref "#get-message-by-id" >}}) to get media attachments.
[
{
"id": "[email protected]",
"name": "John Doe",
"picture": "https://example.com/picture.jpg",
"lastMessage": {
"id": "[email protected]_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"timestamp": 1667561485,
"from": "[email protected]",
"fromMe": true,
"to": "[email protected]",
"body": "Hi there!",
...
},
"_chat": {
...
}
}
]
Pagination:
-
limit=100- limit the number of chats to return -
offset=0- skip the number of chats from the start