up
This commit is contained in:
@@ -1082,15 +1082,12 @@ class BotService {
|
||||
if (function_exists('writeLog')) writeLog('INFO', "Operator {$operatorId} finished attending for {$phoneNumber}, survey={$template}");
|
||||
|
||||
// Ensure consistent behavior: release hold / clear flags when finishing attend
|
||||
// Do NOT send the main menu nor notify the user that the conversation is resumed.
|
||||
try {
|
||||
// Release hold silently to avoid duplicate notification after finishing attend
|
||||
$this->releaseHold($phoneNumber, false);
|
||||
// Re-send main menu/topic so the user sees the menu after the advisor finishes
|
||||
try {
|
||||
$this->showMainMenu($phoneNumber);
|
||||
} catch (Exception $e) {
|
||||
error_log('finishAttendConversation: showMainMenu failed: ' . $e->getMessage());
|
||||
}
|
||||
// Send notification that conversation has been resumed, but do NOT auto-send the menu.
|
||||
$this->releaseHold($phoneNumber, true);
|
||||
// Intentionally not calling showMainMenu or sending a 'conversation resumed' message here.
|
||||
} catch (Exception $e) {
|
||||
error_log('finishAttendConversation: releaseHold failed: ' . $e->getMessage());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user