How to detect if users are online (using API connector only)

In the tweet, Airdev says that API point doesn’t overload Bubble. I didn’t test, but I’ll take their word for it.

The plot thickens.
That indicator will stop working as expected. The problems are:

  • timezones
  • the weird way that Bubble handles current date/time.

The solution to the timezone problem is to do use :extract Unix timestamp to fix a timezone that you are comparing things to.
– hat-tip to @sublemonster describes on this thread:

The other solution is to NOT rely on Bubble’s current date / time. Instead create a workflow that fires every 5 seconds to update a state on the page with a Unix timestamp. For my example, I subtract 10 seconds because my logic is that if the user has not been online for the last 10 seconds, than mark the user as offline.

1 Like