canove / whaticket-community

A very simple Ticket System based on WhatsApp messages, that allow multi-users in same WhatsApp account.
MIT License
1.51k stars 773 forks source link

Ignore whatsapp-web.js type definition - Fix #600 #602

Closed allgood closed 4 months ago

allgood commented 8 months ago

Looks like whatsapp-web.js on version 1.23.0 changed the type definition of Location, mostly because a change on how to send the location. They removed the values for name, address, url and description from the Location object and created an Option object that includes only name, address and url.

BUT, received location stills come with the old format AND the code fails to build because of the type differences.

This pull request make whaticket compatible with whatsapp-web.js 1.23.0 bypassing typescript checks for two lines that uses the location.description value of messages.

I will open an issue on whatsapp-web.js so we can remove this bypass on the future.

sonarcloud[bot] commented 8 months ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

allgood commented 8 months ago

There is a PR on whatsapp-web.js that will change the definition of the Location received too, so next update will have to be adapted.