fritzmg / contao-sharebuttons

Simple extension to provide share buttons as a module and content element in Contao
GNU Lesser General Public License v3.0
18 stars 2 forks source link

PR for updating WhatsApp share buttons to include their new click-to-chat format #50

Closed zoglo closed 3 years ago

zoglo commented 3 years ago

Hello @fritzmg,

this PR introduces the new whatsapp click to chat function. They did change the way they are sharing messages a while ago and it works with desktop clients as well. It should fix Issue https://github.com/fritzmg/contao-sharebuttons/issues/37.

Changes:

I removed the \Environment check completely. We won't need it with whatsapp-web being on desktop clients and the \Environment class didn't get mobile devices anymore.

I've debugged through my local installation and found out that it even used the Environment class from certain tests from other plugins such as Haste. It should have been used with Contao\Environment to not introduce other bugs. I do think it isn't needed anymore.

I've also added a target _blank so users do not leave the website when clicking on the link (Important for desktop clients).

References:

https://faq.whatsapp.com/general/chats/how-to-use-click-to-chat

fritzmg commented 3 years ago

Thank you very much :). Released as 2.2.0.

fritzmg commented 3 years ago

Oh woops, I actually forgot to click the merge button 🙈