# Automatically hide livechat on website when no agent is available

**URL:** https://forums.rocket.chat/t/automatically-hide-livechat-on-website-when-no-agent-is-available/7805
**Category:** Community Support
**Created:** [July 25, 2020, 10:44am UTC](https://forums.rocket.chat/t/automatically-hide-livechat-on-website-when-no-agent-is-available/7805 "2020-07-25T10:44:52Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![puddingbrain](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/puddingbrain/32/1983_2.png) [@puddingbrain](https://forums.rocket.chat/u/puddingbrain)
#### Post date: [July 25, 2020, 10:44am UTC](https://forums.rocket.chat/t/automatically-hide-livechat-on-website-when-no-agent-is-available/7805/1 "2020-07-25T10:44:52Z")

</div>

From my understanding, it currently is not possible to hide the livechat widget when no agent is available. I am aware of the offline functionality, but I am not interested in that. My use case would be to indeed only show the live chat on the website, when (and only when) an agent is available.

Issue seems to be [https://github.com/RocketChat/Rocket.Chat/issues/16264](https://github.com/RocketChat/Rocket.Chat/issues/16264) but it has not seen any action so far.

---

<div class="post-metadata">

### Author: ![puddingbrain](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/puddingbrain/32/1983_2.png) [@puddingbrain](https://forums.rocket.chat/u/puddingbrain)
#### Post date: [August 8, 2020, 9:13am UTC](https://forums.rocket.chat/t/automatically-hide-livechat-on-website-when-no-agent-is-available/7805/2 "2020-08-08T09:13:37Z")

</div>

Any info on this? ignore\_post\_needs\_more\_characters

---

<div class="post-metadata">

### Author: ![puddingbrain](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/puddingbrain/32/1983_2.png) [@puddingbrain](https://forums.rocket.chat/u/puddingbrain)
#### Post date: [July 9, 2021, 3:26pm UTC](https://forums.rocket.chat/t/automatically-hide-livechat-on-website-when-no-agent-is-available/7805/3 "2021-07-09T15:26:50Z")

</div>

Does [[FIX] Checks the list of agents if at least one is online by tiagoevanp · Pull Request #22584 · RocketChat/Rocket.Chat · GitHub](https://github.com/RocketChat/Rocket.Chat/pull/22584) allow to hide livechat from website if no agent is available? It would be very useful to have descriptive PR messages. Currently the PR in question has no info at all which makes it very hard to understand the scope of the PR.

---

<div class="post-metadata">

### Author: ![john.crisp](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/john.crisp/32/2711_2.png) [@john.crisp](https://forums.rocket.chat/u/john.crisp)
#### Post date: [July 12, 2021, 8:31am UTC](https://forums.rocket.chat/t/automatically-hide-livechat-on-website-when-no-agent-is-available/7805/4 "2021-07-12T08:31:40Z")

</div>

I think it must be you asking this on open.rocket.chat as well?

This is our workaround - it is perfectly possibly to do this:

> <https://github.com/RocketChat/Rocket.Chat/issues/16264#issuecomment-658157529>
>
> Would it be possible to implement the following events for the livechat API ?
> 
> …
> onAgentsAvailable - fires when online agents are detected
> onAgentsUnavailable - fires when no online agents are detected
> 
> They could be useful for example to have a different look and functionality on a "help button" if there is at least one agent available.
> 
> I know there is the onAgentStatusChange event, but it seems to only fire for agents that are assigned to an existing chat.

This issue is still left open for the product managers:

> <https://github.com/RocketChat/Rocket.Chat.Livechat/issues/576>
>
> \*\*Currently\*\*
> Livechat allows shows. When no agent available it shows as offlin…e.
> 
> \*\*Expected\*\*
> Do not show the chat at all when no agent is available and only ever show livechat when agent is available.
> 
> Related: #332, https://github.com/RocketChat/feature-requests/issues/417
