Skip to content

Commit b72b954

Browse files
authored
Merge pull request #332 from NeyerOlmos/WhatsAppPayloadUpdate
WhatsAppPayload updated with the last click to chat feature and link …
2 parents a52a22c + b0fd497 commit b72b954

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

QRCoder/PayloadGenerator.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,10 @@ public class WhatsAppMessage : Payload
331331
/// <summary>
332332
/// Let's you compose a WhatApp message and send it the receiver number.
333333
/// </summary>
334-
/// <param name="number">Receiver phone number</param>
334+
/// <param name="number">Receiver phone number where the <number> is a full phone number in international format.
335+
/// Omit any zeroes, brackets, or dashes when adding the phone number in international format.
336+
/// Use: 1XXXXXXXXXX | Don't use: +001-(XXX)XXXXXXX
337+
/// </param>
335338
/// <param name="message">The message</param>
336339
public WhatsAppMessage(string number, string message)
337340
{
@@ -351,7 +354,7 @@ public WhatsAppMessage(string message)
351354

352355
public override string ToString()
353356
{
354-
return ($"whatsapp://send?phone={this.number}&text={Uri.EscapeDataString(message)}");
357+
return ($"https://wa.me/{this.number}?text={Uri.EscapeDataString(message)}");
355358
}
356359
}
357360

0 commit comments

Comments
 (0)