feat: port quality, escalation, KB version, site-map KB, experiments and metrics
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const crypto = require('crypto');
|
||||
const prom = require('./prom');
|
||||
|
||||
// Phase 0:验签 -> 去重 -> 只处理 contact 的 message.created -> 回一条占位消息。
|
||||
// Phase 1 会把这里替换成 bridge AI 编排。
|
||||
@@ -29,6 +30,7 @@ function createLibreDeskWebhook(cfg, deps = {}) {
|
||||
async function handle(body) {
|
||||
if (!body || body.event !== 'message.created') return;
|
||||
const msg = body.payload || {};
|
||||
prom.inc('bridge_webhook_events_total', { event: body.event || 'unknown' });
|
||||
if (msg.sender_type !== 'contact' || msg.private) return;
|
||||
if (!msg.uuid || !msg.conversation_uuid) return;
|
||||
if (!markSeen(msg.uuid)) return;
|
||||
|
||||
Reference in New Issue
Block a user