# How does the online presence work?

**URL:** <https://meta.discourse.org/t/how-does-the-online-presence-work/258498>\
**Category:** Support\
**Tags:** chat\
**Created:** [March 17, 2023, 12:29pm UTC](https://meta.discourse.org/t/how-does-the-online-presence-work/258498 "2023-03-17T12:29:18Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![maiki](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/maiki/32/233950_2.png) [@maiki](https://meta.discourse.org/u/maiki)\
**Post date:** [March 18, 2023, 12:58am UTC](https://meta.discourse.org/t/how-does-the-online-presence-work/258498/2 "2023-03-18T00:58:30Z")

</div>

Hiya Simon! 👋

> [@simon\_tomes](#):
>
> I’m curious how it works and when it switches “on” and "off. What constitutes being online? Is there a time limit for inactivity or lack of focus?

I asked our chat team and they shared this note from the library that handles the user presence:

> <https://github.com/discourse/discourse/blob/v3.1.0.beta3/app/assets/javascripts/discourse/app/lib/user-presence.js#L16-L19>

Which equates to: show online if…

- browser is not in the background, and
- there has been user activity in the last minute

> [@simon\_tomes](#):
>
> Does it work with the Discourse Hub and a PWA as well as on a desktop browser?

Both are browsers, and allow user activity, so it will reflect it when the user is actually looking at the site (merely opening Discourse Hub app doesn’t constitute “viewing” the site in a browser, for instance).

Does that give you enough detail to share with your community? 🙂

---

_[View the full topic](https://meta.discourse.org/t/how-does-the-online-presence-work/258498)._
