fix(paradizweb): fallback client key for old plugin sessions + booking lead logs

This commit is contained in:
OpenClaw Assistant
2026-03-03 00:15:30 +03:00
parent 7f4b7c1eb1
commit d3cb912861

View File

@@ -126,6 +126,8 @@ async function sendTelegramBookingLead(userText) {
headers: { 'content-type': 'application/x-www-form-urlencoded' },
body
});
if (res.ok) console.log('[paradizweb] booking lead sent');
else console.log(`[paradizweb] booking lead send failed status=${res.status}`);
return res.ok;
}
@@ -188,7 +190,9 @@ const server = http.createServer(async (req, res) => {
try {
const parsed = JSON.parse(body || '{}');
const question = String(parsed.question || '').trim();
const clientId = String(parsed.client_id || '').trim();
const rawClientId = String(parsed.client_id || '').trim();
const fallbackClientId = `${req.socket?.remoteAddress || 'unknown'}|${String(req.headers['user-agent'] || '').slice(0,120)}`;
const clientId = rawClientId || fallbackClientId;
if (!question) return json(res, 400, { ok: false, error: 'question_required' });
if (HUMAN_RE.test(question)) {