web
web copied to clipboard
Unclear when user is present vs. in other tab vs. offline
This PR will show whether the partner's socket is connected or not: https://github.com/UPchieve/server/pull/371
But a user can have a connected socket and still be unreachable (e.g. they're in another tab). What's the best way to address this?
ideas
- https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API
- read receipts
The Page Visibility API looks like a good option. It has support back pretty far in pretty much every browser, so not likely to need shims.