RocketChat / RocketChat/Rocket.Chat
Offline Emails
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
name: Offline Email
about: Emails not received when Out of Office
Description:
When an email is sent to an Email Inbox, and it is out of Business Hours / no online agents. Email does not go into Queue, or offline channel.
Steps to reproduce:
- Change business hours so out of business
- Send an email to Email Inbox.
Expected behavior:
Either the email should go into the queue, as emails are less time sensitive, and more persistent than LiveChats.
Or send details into Offline Channel given in Settings.
Actual behavior:
Email not found on server at all.
{"level":50,"time":"2022-05-12T21:01:17.299Z","pid":634,"hostname":"mail.k-c13.org","name":"Livechat","msg":"Error receiving email","err":{"type":"errorClass","message":"Sorry, no online agents [no-agent-online]","stack":"Error: Sorry, no online agents [no-agent-online]
Email is rejected as no online agents.
Server Setup Information:
- Version of Rocket.Chat Server: 4.6.3
- Operating System: Debian
- Deployment Method: tar
- NodeJS Version: v14.19.2
- MongoDB Version: 4.4.13 / wiredTiger (oplog Enabled)
Client Setup Information
- Desktop App or Browser Version: App / Website
- Operating System: Windows 10 / Linux Mint
Relevant logs:
{"level":50,"time":"2022-05-12T21:11:13.915Z","pid":634,"hostname":"---","name":"Livechat","msg":"Error receiving email","err":{"type":"errorClass","message":"Sorry, no online agents [no-agent-online]","stack":"Error: Sorry, no online agents [no-agent-online]<br> at app/livechat/server/lib/QueueManager.js:51:10<br> at /srv/rocketchat/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40<br> => awaited here:<br> at Function.Promise.await (/srv/rocketchat/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:56:12)<br> at app/livechat/server/lib/Livechat.js:194:8<br> at /srv/rocketchat/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40<br> => awaited here:<br> at Function.Promise.await (/srv/rocketchat/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:56:12)<br> at app/livechat/server/lib/Livechat.js:219:9<br> at /srv/rocketchat/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40","isClientSafe":true,"error":"no-agent-online","reason":"Sorry, no online agents","errorType":"Meteor.Error"},"msg":"Sorry, no online agents [no-agent-online]"}
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
Read app/livechat/server/lib/QueueManager.js at line 51 and app/livechat/server/lib/Livechat.js around lines 194 and 219. Reproduce the failure with business hours closed and an email sent to the inbox, then trace the no-agent-online path. Done means the email has a defined queue or offline-channel outcome instead of being rejected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100