fix: cannot send message on new Whatsapp Business limited accounts (#2080)

* fix: cannot send message on new Whatsapp Business limited accounts

* chore: add woraround to resend the message on 475 errors

* fix: lint

* fix: add handler

* fix: lint

* Update src/Socket/messages-send.ts

---------

Co-authored-by: Rajeh Taher <rajeh@reforward.dev>
This commit is contained in:
Cassio Santos
2025-11-19 10:18:19 -03:00
committed by GitHub
parent 0145e4c710
commit 5c456e514e
7 changed files with 67 additions and 3 deletions
+2 -1
View File
@@ -1037,7 +1037,8 @@ export const makeChatsSocket = (config: SocketConfig) => {
const historyMsg = getHistoryMsg(msg.message!)
const shouldProcessHistoryMsg = historyMsg
? shouldSyncHistoryMessage(historyMsg) && PROCESSABLE_HISTORY_TYPES.includes(historyMsg.syncType! as proto.HistorySync.HistorySyncType)
? shouldSyncHistoryMessage(historyMsg) &&
PROCESSABLE_HISTORY_TYPES.includes(historyMsg.syncType! as proto.HistorySync.HistorySyncType)
: false
// State machine: decide on sync and flush