Feature: Implement multi-stage Conversation Flow Engine with TestFlow
This commit is contained in:
@@ -299,6 +299,11 @@ class WhatsAppController extends BaseController
|
||||
private function triggerAutoReply(array $session, array $msgData)
|
||||
{
|
||||
try {
|
||||
// Hook the Conversation Flow Engine to intercept messages for active or new flows
|
||||
if (\App\Core\Flows\ConversationFlowEngine::processMessage($session, $msgData)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$rule = \App\Models\ChatbotRule::findActiveForRule($session['company_id'], $session['id']);
|
||||
if (!$rule || !$rule['is_active']) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user