Skip to content

Commit

Permalink
Set correct wait time if visitor closes bot chat
Browse files Browse the repository at this point in the history
  • Loading branch information
remdex committed Dec 17, 2018
1 parent 69c433c commit 98f3fae
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lhc_web/modules/lhchat/chatwidgetclosed.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,12 @@
}

if ($chat->wait_time == 0) {
$chat->wait_time = time() - ($chat->pnd_time > 0 ? $chat->pnd_time : $chat->time);
if ($chat->status == erLhcoreClassModelChat::STATUS_BOT_CHAT){
$chat->pnd_time = time();
$chat->wait_time = 2;
} else {
$chat->wait_time = time() - ($chat->pnd_time > 0 ? $chat->pnd_time : $chat->time);
}
}

$explicitClosed = true;
Expand Down

0 comments on commit 98f3fae

Please sign in to comment.