Closed gekkedev closed 3 months ago
I might have been wrong on this:
client.getMessages(chatId)
returns messages where the sender
attribute is a Contact
object. The attribute id
is a WID
, not a serialized string. In wa-js this is also defined as WID
: https://github.com/wppconnect-team/wa-js/blob/4df7fee17ed071b461e2da28d8e6c9e7592c9739/src/whatsapp/models/ContactModel.ts#L28
However, I'm pretty sure I had a use case where it was a serialized string (need to find out when exactly for reproduction).
It could be, that the type of id
depends on which methods we use to get a Contact
object. 🤔
@icleitoncosta what is the desired state here?
string | WID
WID
From what I observed, this is a string (serialized format, user@server). If there are exceptions where it is actually a
WID
object, let me know and I'll adapt this PR.