robvanderleek / mudslide

Send WhatsApp messages from the command-line
ISC License
122 stars 12 forks source link

Sending Location Message #7

Closed coccovax closed 1 year ago

coccovax commented 1 year ago

It would be nice to send location message too.

robvanderleek commented 1 year ago

Hi @coccovax

Thanks for your feature request.

It's possible in the WhatsApp API library I'm using to send a location but it requires the position in latitude and longitude degrees. I then wonder how this would work in practice: would users first lookup a location coordinate, or would they expect a comnand-line tool to get that information from the OS.

Could you perhaps tell me a bit more about your use case?

coccovax commented 1 year ago

Hi @robvanderleek, thanks for your reply. My use case involves always fixed coordinates known to the system. When a user books a service, she receives a message with instructions for using it. Having the location in the message would also be very nice.

create-issue-branch[bot] commented 1 year ago

Branch issue-7-Sending_Location_Message created!

robvanderleek commented 1 year ago

Hi @coccovax

I've added a new feature for sending a location message in this pull-request

If you know how to checkout the repository and run the application using yarn start it would be helpful to let me know if this works for you. Otherwise, no problem, I'll do a bit more testing/documentation and merge the pull-request soon.

coccovax commented 1 year ago

@robvanderleek thanks a lot. In this period I'm very busy, but I'll try to do the tests you ask for asap.

coccovax commented 1 year ago

Hi @robvanderleek, I did some tests and location is sent only if coordinates are positive and there are max 4 decimals. I used this coordinates for testing -33.8677835,-63.9863332. The result is:

Thank a lot

robvanderleek commented 1 year ago

Thanks for the testing @coccovax!

I've fixed the issues, also see the README.

Can you give it another try please?

coccovax commented 1 year ago

Hi @robvanderleek, good job! It worked for me! Thanks a lot!

robvanderleek commented 1 year ago

Cool! I'll merge it main then 😄