Mibew Messenger Community
General => Support => Topic started by: Megha on November 29, 2012, 11:38:01 AM
-
When two parties (A & B) are in the middle of a chat and then A goes away for say more than 10 minutes, both parties should automatically log off after a defined period of inactivity. Or else B will keep waiting not knowing A is not at his desk for last 10 minutes.
In fact, even if A is at his desk but has the chat window minimized for some reason, he will not see the messages/pings B is sending him as no visual notifications can be sent to him during the chat. While A has almost forgot about his chat with B & is now unaware of B's messages; B is getting frustrated and thinking A is not at his desk at all.
I will appreciate whoever can provide some insight into how to incorporate these into mibew OR just redirect me to an appropriate post. Thank you!
-
Bumping thread. I've noticed the same behavior, a workaround is simply to have another operator take the chat window away and close it.
A generic operator process would be one way to achieve this, e.g. a bot operator script run on cron.
( if thread == active && dtm_last_modified > 10minutes, close thread)
Would be a nice feature, I'll be looking into it personally if I can find some time to chew on it.
-
I am glad to see some response!
On bobscan, can you elaborate little more on your suggestion of writing cron job? I am not sure how cron job (which is external to this chat program) can access running state of a thread.
Meanwhile I am trying to gain understanding to the code. I haven't figured when the following condition will be met inside libs/chat.php:ping_thread()
if ($lastping > 0 && abs($current - $lastping) > $connection_timeout)
What I find is ping_thread() is called continuously and hence above difference is never more than 2-3 seconds while connection_timeout is set for 30 seconds. If this condition is met somehow, auto timeout for sessions can be achieved.
Inputs???
-
i was thinking about closing a thread, moreso than logging out, but thinking about this further it seems the best way would be to
a.) if operator is inactive >10 minutes, use the 'operator is having connection issues, redirecting back into queue' process
b) if user is inactive for >10 minutes, close_thread();
not sure yet how to accomplish setting an operator to 'Away' mode if globally inactive for >10 minutes, but there should be a way to do this.
the cron job could call a script every x-minutes checking the chat database for certain flags, such as the dtmmodified timestamp.
-
Has anyone made progress on this?
v/r
Michael