138 fix agent status on pause
Closes #138
Final solution has two parts:
- fc59acd9068 clear user status when leaving pause (same code as already discussed 30673d305)
- b34215e2fd do not store userStatus when Agent state changes via status available or disconnected
First part is not enough - in first scenario described in bug:
- xuc first receive
AgentUserStatus(agentId=NNN,userStatus="available")
- then xuc receive
AgentOnPause
which does not contain userStatus (and therefore old user status is used, in this case "available")
What do you think about this proposal? I tested it some (incl. both described scenarions), didn't find a problem. But probab;y there are still edge cases (f.x. when using predefined "berightback" state) which this does not solve. But I hope this will solve most of problems in real usage.