You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should handle all media and text and document type messages and above code should be able to sync messages to CRM
What is actually happening?
It's only working with text and media and when it comes to documents, I'm able to intercept it using above code but actual messages is not able to go, and it went through when we retry it.
it works with pdf files though but not working with docx, pptx etc
I'm using WPP.chat.downloadMedia(message.id); to download media
SS of error: Here photo is sent on one go but docs are not processing
Any additional comments?
I think there is some interception issue while sending few documents, while it worked well with media files
The text was updated successfully, but these errors were encountered:
WA-JS Version
3.16
WhatsApp Version
2.3000.1019206571
Browser Version
131.0.6778.265
Operation System
Windows 11 Enterprise
Steps to reproduce
I'm using wa-js in chrome extension to listen to new messages and sync them to connected CRM.
using the following code after initiating the WPP and sending a docx or pptx file from WhatsApp web UI
WPP.ev.on("chat.new_message", async (message) => {
processMessage(message, "single"); //handle text and media messages
});
async function processMessage(message, type) {
try {
if (!message?.type) {
console.warn("Invalid message structure");
return;
}
// logic for CRM sync
} catch (error) {
console.warn(
Error processing message: ${message?.id || "Unknown"}
, error);}
}
async function handleMediaMessage(message) {
try {
console.log("Media message detected:", message);
} catch (error) {
console.warn("Error handling media message:", error);
return null;
}
What is expected?
It should handle all media and text and document type messages and above code should be able to sync messages to CRM
What is actually happening?
It's only working with text and media and when it comes to documents, I'm able to intercept it using above code but actual messages is not able to go, and it went through when we retry it.
it works with pdf files though but not working with docx, pptx etc
I'm using WPP.chat.downloadMedia(message.id); to download media
SS of error: Here photo is sent on one go but docs are not processing
Any additional comments?
I think there is some interception issue while sending few documents, while it worked well with media files
The text was updated successfully, but these errors were encountered: