livehelperchat icon indicating copy to clipboard operation
livehelperchat copied to clipboard

Automatic closing of chats is not done if user does not send messages

Open jyrkiput opened this issue 11 years ago • 3 comments

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.

jyrkiput avatar Apr 01 '15 06:04 jyrkiput

And the while is lhc_web/lib/core/lhchat/lhchatworkflow.php in function automaticChatClosing

jyrkiput avatar Apr 01 '15 06:04 jyrkiput

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.

remdex avatar Apr 01 '15 06:04 remdex

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.

remdex avatar Apr 01 '15 06:04 remdex