RocketChat / RocketChat/Rocket.Chat
How to Handle Open Sessions When Agent Goes Offline - Not Working
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
If this settings is set to 'forward' the rocket wont forward the user to another agent ...
Steps to reproduce:
- Set "How to Handle Open Sessions When Agent Goes Offline" at Settings -> OmniChannel -> Sessions to "Forward"
- Get 2 agents on a department
- Get a new visitor
- The agent that take that chat must goes offline - close RocketChat page
- After the specified timeout nothing hapend.
Expected behavior:
At step 5, we expected that the visitor are forward back to the original queue or to a new agent.
Actual behavior:
At step 5, the chat/visitor are not forward
Server Setup Information:
- Version of Rocket.Chat Server: 3.15.0
- Operating System: Linux/Debian 10
- Deployment Method: Docker
- Number of Running Instances: 1
- DB Replicaset Oplog:
- NodeJS Version: v12.22.1
- MongoDB Version: 4.0.24
Client Setup Information
- Desktop App or Browser Version: Brave V1.26.67
- Operating System: MAC Os
Additional context
Relevant logs:

rocketchat_1 | errorClass [Error]: The selected department and the current room department are the same [error-forwarding-chat-same-department]
rocketchat_1 | at app/livechat/server/lib/Helper.js:359:9
rocketchat_1 | at /app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40 {
rocketchat_1 | isClientSafe: true,
rocketchat_1 | error: 'error-forwarding-chat-same-department',
rocketchat_1 | reason: 'The selected department and the current room department are the same',
rocketchat_1 | details: { function: 'forwardRoomToDepartment' },
rocketchat_1 | errorType: 'Meteor.Error'
rocketchat_1 | }
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in app/livechat/server/lib/Helper.js at line 359 and inspect forwardRoomToDepartment, using the reported error and the OmniChannel Sessions setting as context. Reproduce the offline-agent timeout flow, then verify that an open visitor session is forwarded to the original queue or another agent without triggering the same-department error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100