Automatic closing of chats is not done if user does not send messages
When user opens a new chat and doesn't send any messages (user only gives nick and initial question) and closes the chat, the chat is not closed when cronjob is executed. The reason for this seems to be
erLhcoreClassChat::getList(array('limit' => 500,'filtergt' => array('last_user_msg_time' => 0), 'filterlt' => array('last_user_msg_time' => $delay), 'filter' => array('status' => erLhcoreClassModelChat::STATUS_ACTIVE_CHAT))) as $chat)
where
'filtergt' => array('last_user_msg_time' => 0)
does not match in this situation.
And the while is lhc_web/lib/core/lhchat/lhchatworkflow.php in function automaticChatClosing
Ok, understood the issue. Will see what I can do in the evening. Just need proper logic. Because if I ignore 0 that means all chats will be closed instantly. And if i set last message time to initial time, it would appear in unread chats list and duplicate pending one. Tricky situation.
Or perhaps, add another one filter (conditional or) if last message time = 0, and creation time < timeout chat closing. This would make sense i think.