wppconnect-team / WPP4Delphi

WPP4Delphi is an open-source project with the aim of exporting functions from WhatsApp Web for Delphi, which can be used to support the creation of any interaction.
Apache License 2.0
187 stars 61 forks source link

Demo send images but with message errors and have problem with italian mobile number #78

Closed enricogaggero closed 2 months ago

enricogaggero commented 2 months ago

Notice : the mobile italian number format is like +39 333 1234567 or +39 333 123456 (for old number). I do some tests 1) If I put in "Numero Destino" a number like 393331234567 and I press Texto Simples New the message is send but I have an Access Violation. 2) If I put in "Numero Destino" a number like 393331234567 and I press Texto Simples I have a message of Numero Invalido.

3) If I put in "Numero Destino" a number like 393331234567 and I press Inviar Imagem I have a message of Numero Invalido.

4) If I put in "Numero Destino" a number like 393331234567@c.us and I press Inviar Imagem the message is not send and I have 4 time a message Unknow Protocol and after a Access Violation and the messagge with image is send.

marcelo386 commented 2 months ago

Config Component

AjustNumber AllowOneDigitMore = False AutoAjust = True DDIDefault = 55 LengthDDI = 2 LengthDDD = 3 LenhthPhone = 7

marcelo386 commented 2 months ago

sending it this way skips a check for the valid number 393331234567@c.us

you can send through the options without needing to inform @c.us SendFileMessageNew, SendTextMessageNew, SendListMessageNew, SendLocationMessageNew and SendVCardContactMessageNew

enricogaggero commented 2 months ago

SendFileMessageNew, SendTextMessageNew, SendListMessageNew, SendLocationMessageNew and SendVCardContactMessageNew are the future way ? Is better rewrite my code updating old functions ? Thanks