Open Souhaibahar opened 5 days ago
3.4.0
2.3000.1014410277-alpha
Latest Chrome
Windows 10
private async Task SendMessage(SendRequest request) { try { var encodedMessage = JavaScriptEncoder.Default.Encode(request.Message);
var options = "{ markIsRead: true }"; if (request.CreateChat) { options = "{ createChat: true }"; } else if (!string.IsNullOrEmpty(request.ReplyToMessageId)) { options = "{ quotedMsg: '_MESSAGE_ID_' }".Replace("_MESSAGE_ID_", request.ReplyToMessageId); } await Page.EvaluateFunctionAsync(@"async () => { await WPP.chat.sendTextMessage('CONTACT_ID@c.us', '_MESSAGE_', _OPTIONS_) }".Replace("CONTACT_ID", request.Name).Replace("_MESSAGE_", encodedMessage).Replace("_OPTIONS_", options)).ConfigureAwait(false); return true; } catch (Exception ex) { Console.WriteLine(ex.ToString()); return false; } }
To the message be sended as a reply ( when quotedMsg isnot null ) but it's not working
The message is sended succefully but not as a response
No response
WA-JS Version
3.4.0
WhatsApp Version
2.3000.1014410277-alpha
Browser Version
Latest Chrome
Operation System
Windows 10
Steps to reproduce
private async Task SendMessage(SendRequest request) {
try {
var encodedMessage = JavaScriptEncoder.Default.Encode(request.Message);
What is expected?
To the message be sended as a reply ( when quotedMsg isnot null ) but it's not working
What is actually happening?
The message is sended succefully but not as a response
Any additional comments?
No response