Revert "up"

This reverts commit 269dc6bed1.
This commit is contained in:
Lizandro Guarnizo
2026-01-27 01:04:32 -05:00
parent 269dc6bed1
commit 83132ff0d5
3 changed files with 0 additions and 176 deletions
-12
View File
@@ -304,18 +304,6 @@ class WhatsAppWebhook {
} catch (Exception $e) {
error_log('Failed to create notification: ' . $e->getMessage());
}
// Try to publish a lightweight event to Redis so SSE/WebSocket listeners can be notified immediately
try {
if (extension_loaded('redis')) {
$payload = json_encode(['type' => 'new_message', 'user_id' => $user['id'], 'message_id' => (int)$conversationId, 'created_at' => date('Y-m-d H:i:s')]);
$r = new Redis();
$r->connect('127.0.0.1');
$r->publish('user_' . $user['id'], $payload);
}
} catch (Exception $e) {
error_log('[webhook] redis publish failed: ' . $e->getMessage());
}
// Procesar con bot (protección contra excepciones externas)
try {