revert: verwijder ackTracker (dwaalspoor) — bridge fabriceert acks
ackTracker + message_ack-verwerking + check-loop + ACK_* env + docs uit de bot. De bridge fabriceert acks (5219 blz 2 kreeg ack=2 zonder transmissie), dus ack-tracking gaf verkeerde signalen. Enige betrouwbare bron: apparaat + getInfo. Media-pacing zit nu bridge-breed (MEDIA_SEND_DELAY_MS). Poppler re-render als fix verwijderd uit docs (wassen neus voor de race-klasse).
This commit is contained in:
parent
214893205b
commit
ee9b67a78e
7 changed files with 33 additions and 264 deletions
|
|
@ -2,7 +2,6 @@ const { findDienst, getPngFilePaths } = require('./dienstService')
|
|||
const { sendTextMessage, sendImageMessage, notifyAdmin, sendChatSeen } = require('./whatsappApi')
|
||||
const { checkLimit, increment, MAX_REQUESTS_PER_DAY } = require('./rateLimiter')
|
||||
const { increment: incrementDaily } = require('./dailyStats')
|
||||
const { handleAck } = require('./ackTracker')
|
||||
|
||||
const ALLOWED_GROUP = process.env.ALLOWED_GROUP
|
||||
const ALLOWED_GROUP_NAMES = (process.env.ALLOWED_GROUP_NAME || '')
|
||||
|
|
@ -24,13 +23,6 @@ function extractDienstnummer(body) {
|
|||
}
|
||||
|
||||
async function handleWebhook(payload) {
|
||||
if (payload.dataType === 'message_ack') {
|
||||
if (payload.sessionId && payload.sessionId !== process.env.WHATSAPP_SESSION) return
|
||||
const { message, ack } = payload.data || {}
|
||||
const id = message && (message.id?.id || message._data?.id?.id)
|
||||
if (id) handleAck(id, ack)
|
||||
return
|
||||
}
|
||||
if (payload.dataType !== 'message') return
|
||||
if (payload.sessionId !== process.env.WHATSAPP_SESSION) return
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue