Open FelipeDeveloperFullStack opened 9 months ago
Happens to me too
+1
+1
If these newsletter messages are not important, just ignore them with the code below
makeWASocket({
shouldIgnoreJid: jid => {
return jid && jid.endsWith('@newsletter')
}
})
+1
Baileys is returning the following error related to the newsletter {"from":"120363155488152222@newsletter"}. Is there any treatment for this problem? It only happens when I go to Channels on Whatsapp.
{"level":50,"time":"2024-02-02T13:43:56.678Z","pid":1221,"hostname":"CSPMOB006","err":{"type":"Error","message":"Unknown message type","stack":"Error: Unknown message type\n at decodeMessageNode (/home/deploy/atendflow/backend/node_modules/@whiskeysockets/baileys/lib/Utils/decode-wa-message.js:72:15)\n at decryptMessageNode (/home/deploy/atendflow/backend/node_modules/@whiskeysockets/baileys/lib/Utils/decode-wa-message.js:99:45)\n at handleMessage (/home/deploy/atendflow/backend/node_modules/@whiskeysockets/baileys/lib/Socket/messages-recv.js:541:96)\n at execTask (/home/deploy/atendflow/backend/node_modules/@whiskeysockets/baileys/lib/Socket/messages-recv.js:673:20)\n at processNodeWithBuffer (/home/deploy/atendflow/backend/node_modules/@whiskeysockets/baileys/lib/Socket/messages-recv.js:670:15)\n at WebSocketClient. (/home/deploy/atendflow/backend/node_modules/@whiskeysockets/baileys/lib/Socket/messages-recv.js:679:9)\n at WebSocketClient.emit (node:events:513:28)\n at WebSocketClient.emit (node:domain:489:12)\n at /home/deploy/atendflow/backend/node_modules/@whiskeysockets/baileys/lib/Socket/socket.js:236:35\n at Object.decodeFrame (/home/deploy/atendflow/backend/node_modules/@whiskeysockets/baileys/lib/Utils/noise-handler.js:136:17)\n at WebSocketClient.onMessageRecieved (/home/deploy/atendflow/backend/node_modules/@whiskeysockets/baileys/lib/Socket/socket.js:212:15)\n at WebSocketClient.emit (node:events:513:28)\n at WebSocketClient.emit (node:domain:489:12)\n at WebSocket. (/home/deploy/atendflow/backend/node_modules/@whiskeysockets/baileys/lib/Socket/Client/web-socket-client.js:46:100)\n at WebSocket.emit (node:events:513:28)\n at WebSocket.emit (node:domain:489:12)\n at Receiver.receiverOnMessage (/home/deploy/atendflow/backend/node_modules/ws/lib/websocket.js:1209:20)\n at Receiver.emit (node:events:513:28)\n at Receiver.emit (node:domain:489:12)\n at /home/deploy/atendflow/backend/node_modules/ws/lib/receiver.js:581:16\n at node:internal/process/task_queues:141:7\n at AsyncResource.runInAsyncScope (node:async_hooks:203:9)","data":{"tag":"message","attrs":{"from":"120363155488152222@newsletter","type":"text","id":"3EB052FC32C6959B65FF4B","server_id":"1359","t":"1706881425"},"content":[{"tag":"plaintext","attrs":{},"content":{"type":"Buffer","data":[10,245,2,226,157,151,68,97,100,111,115,32,100,111,32,67,101,110,115,111,32,68,101,109,111,103,114,195,161,102,105,99,111,32,97,112,111,110,116,97,109,32,113,117,101,32,111,32,83,117,100,101,115,116,101,32,195,169,32,97,32,114,101,103,105,195,163,111,32,109,97,105,115,32,112,111,118,111,97,100,97,32,100,111,32,66,114,97,115,105,108,44,32,101,32,109,111,115,116,114,97,109,32,116,97,109,98,195,169,109,32,97,115,32,42,195,161,114,101,97,115,32,111,110,100,101,32,110,195,163,111,32,109,111,114,97,32,110,105,110,103,117,195,169,109,42,44,32,99,111,110,99,101,110,116,114,97,100,97,115,32,110,111,32,78,111,114,116,101,44,32,101,115,112,101,99,105,97,108,109,101,110,116,101,32,101,109,32,82,111,114,97,105,109,97,32,101,32,101,109,32,103,114,97,110,100,101,32,112,97,114,116,101,32,100,111,32,65,109,97,122,111,110,97,115,46,32,10,10,65,115,32,105,110,102,111,114,109,97,195,167,195,181,101,115,44,32,100,105,118,117,108,103,97,100,97,115,32,104,111,106,101,44,32,112,97,114,116,101,109,32,100,101,32,109,105,99,114,111,100,97,100,111,115,32,99,111,108,101,116,97,100,111,115,32,101,109,32,99,97,100,97,32,101,110,100,101,114,101,195,167,111,32,118,105,115,105,116,97,100,111,32,112,101,108,111,115,32,114,101,99,101,110,115,101,97,100,111,114,101,115,46,10,10,240,159,145,137,32,104,116,116,112,115,58,47,47,117,111,108,46,112,97,103,101,46,108,105,110,107,47,115,82,78,85,54]}}]},"isBoom":true,"isServer":true,"output":{"statusCode":500,"payload":{"statusCode":500,"error":"Internal Server Error","message":"An internal server error occurred"},"headers":{}}},"msg":"unexpected error in 'processing message'"}