Skip to content

Commit cb1ec7e

Browse files
committed
fix(availability-status): prevent 'away_and_reassigning' and away_manual agents from being set to 'offline' due to incorrect SQL
1 parent a89c3db commit cb1ec7e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/user/queries.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ SET availability_status = 'offline'
123123
WHERE
124124
type = 'agent'
125125
AND (last_active_at IS NULL OR last_active_at < NOW() - INTERVAL '5 minutes')
126-
AND availability_status != 'offline';
126+
AND availability_status NOT IN ('offline', 'away_and_reassigning', 'away_manual');
127127

128128
-- name: set-reset-password-token
129129
UPDATE users

0 commit comments

Comments
 (0)