devlikeapro / waha

WAHA - WhatsApp HTTP API (REST API) that you can configure in a click! Two engines: chromium-based WEBJS and pure-websocket NOWEB
https://waha.devlike.pro/
Apache License 2.0
1.01k stars 306 forks source link

[Feature Request] Last message and Contact on Get all chats #573

Open gamoridev opened 1 month ago

gamoridev commented 1 month ago

On Engine NOWEB. I would like to know if we can add the "Last Message" from every chat on get all chats Request. Also, if the contact info can be added too.

It would be awesome if we have the profilePicture included on the Contact Object, but I know that this could underperform the query. But at least the name of the contact would be great.

  {
    "id": "xxxxxx@s.whatsapp.net",
    "readOnly": false,
    "ephemeralExpiration": 0,
    "ephemeralSettingTimestamp": 0,
    ...
    "lidJid": "xxxxxxx@lid",
    "lastMessageRecvTimestamp": 1728314011
    "lastMessage": "<BODY OF LAST MESSAGE ON CHAT>"
    "contact": {
      "id": "xxxxx",
      "name": "Jhon Doe",
      "profilePicture": "https://xxxx.png" (nice to have)
    }
  },

patron:PLUS

devlikepro commented 1 month ago

Related https://github.com/devlikeapro/waha/issues/566

patron:PRO