You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As stated in the tile, the Contact model's id attribute is sometimes a Wid and sometimes a string. I thought I had corrected this in #2285 but changed it from one possible type to another.
Example`s
client.onMessage(async(message: Message)=>{//.sender.id is a serialized string}
awaitclient.getMessageById("user@server")//.sender.id is an object
To cover up the symptoms I can offer to create a PR that changes the type definition to allow both. Still unclear to me: when exactly to expect which type.
As a result, everyone using WPPConnect has to address this in their code if they want type safety. However, why does this happen in the first place? Is it possible that WA-JS sometimes serializes/deserializes when it shouldn't?
The text was updated successfully, but these errors were encountered:
Description
As stated in the tile, the
Contact
model'sid
attribute is sometimes a Wid and sometimes a string. I thought I had corrected this in #2285 but changed it from one possible type to another.Example`s
To cover up the symptoms I can offer to create a PR that changes the type definition to allow both. Still unclear to me: when exactly to expect which type.
As a result, everyone using WPPConnect has to address this in their code if they want type safety. However, why does this happen in the first place? Is it possible that WA-JS sometimes serializes/deserializes when it shouldn't?
The text was updated successfully, but these errors were encountered: