[BUG] Auto-assigning bot to livechat feature should check the availability of the bot agent
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- backend
Research direction
Start with the live-chat room creation flow and the auto-assignment logic for bot agents, then trace how bot availability is determined after the authentication token expires. Reproduce the 24-hour session-timeout scenario described in the issue; done when a logged-out bot agent is not assigned to a new live-chat room.
Written by the indexing model from the issue text.
Description
Description:
Due to the security issue, we set up session timeout to be 1 day for our Rocket.Chat instance. This leads to the situation that our bot adapter will be logged out after every 24 hours. However, when the guest attempt to create a new live-chat room, the bot agent is still auto-assigned to the live-chat room although it has been logged out. Therefore, the bot agent will not respond to any message from the live-chat guest.
Steps to reproduce:
- Setup "Login Expiration in Days" to be 1 and enable "Forget User Session on Window Close" in Accounts settings.
- Run the bot adapter --> bot adapter get logged in.
- After 24 hours, the bot adapter is logged out due to session timeout. (its authentication token got expired)
- A guest attempt to create a new live-chat room --> the bot agent is still auto-assigned to the live-chat but will not respond anything because the bot adapter got logged out.
Expected behavior:
Rocket.Chat does not auto-assign unavailable bot agents to the live-chat room.
Actual behavior:
Even the bot adapter is logged out due to the session timeout, the live-chat room is still auto-assigned to the bot agent. Therefore there is no response from the bot adapter.
Server Setup Information:
- Version of Rocket.Chat Server: 2.2.0
- Operating System: Windows 10
- Deployment Method: docker
- Number of Running Instances: 1
- DB Replicaset Oplog:
- NodeJS Version: v10.16.3
- MongoDB Version:
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
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.
More from RocketChat/Rocket.Chat
-
type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
RocketChat/Rocket.Chat#42256 ·
-
type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
RocketChat/Rocket.Chat#42248 ·
-
todo type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
RocketChat/Rocket.Chat#42241 ·
-
todo type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
RocketChat/Rocket.Chat#42237 ·
-
type: feature
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
RocketChat/Rocket.Chat#42228 · 1 comment ·
All issues in RocketChat/Rocket.Chat
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·