This feature is now supported by a plugin:
https://meta.discourse.org/t/discourse-presence/48420?u=erlend_sh