Repository navigation
Fixed
is_offlineno longer stays stucktrueacross a logout/login cycle. An agent that went offline (QueueMemberStatusStatus 5) while logged into a queue, was then disconnected and later reconnected its WDA and logged back in, keptis_offline: trueinGET /queues/agents_statusand thequeue_agents_statusevent — nothing cleared the flag after the re-login (only aQueueMemberAddedfires on re-login, and noQueueMemberStatusfollows when the device registered before the queue login). Now:is_offlineis reset tofalsewhen an agent leaves all its queues (full logout / confd dissociation to empty), so a stale value never bleeds into the next login;QueueMemberAddedderivesis_offlinefrom the deviceStatusthe event already carries (Status 5→ offline), so any (re)join reflects the real device state immediately — including an agent added while its device is still unavailable, which a logout-only reset would miss. Guarded onStatuspresence so a source that omits it never clobbers a known state.
Covered by four new unit tests (TDD); the QueueMemberStatus Status-5 → offline path (the "agent offline while still in a queue" case) is unchanged.
Full changelog: v2.6.0...v2.6.1