From b0fd4973b32d8e585f676d53f30ab05a57ccc0dd Mon Sep 17 00:00:00 2001 From: Neyer Olmos Choque Date: Thu, 9 Sep 2021 10:29:58 -0400 Subject: [PATCH] WhatsAppPayload updated with the last click to chat feature and link structure to send messages --- QRCoder/PayloadGenerator.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/QRCoder/PayloadGenerator.cs b/QRCoder/PayloadGenerator.cs index 8f3bd0f8..acfe33dd 100644 --- a/QRCoder/PayloadGenerator.cs +++ b/QRCoder/PayloadGenerator.cs @@ -331,7 +331,10 @@ public class WhatsAppMessage : Payload /// /// Let's you compose a WhatApp message and send it the receiver number. /// - /// Receiver phone number + /// Receiver phone number where the is a full phone number in international format. + /// Omit any zeroes, brackets, or dashes when adding the phone number in international format. + /// Use: 1XXXXXXXXXX | Don't use: +001-(XXX)XXXXXXX + /// /// The message public WhatsAppMessage(string number, string message) { @@ -351,7 +354,7 @@ public WhatsAppMessage(string message) public override string ToString() { - return ($"whatsapp://send?phone={this.number}&text={Uri.EscapeDataString(message)}"); + return ($"https://wa.me/{this.number}?text={Uri.EscapeDataString(message)}"); } }