Document the data model for user presence #13519
Labels
area: documentation (api and integrations)
area: documentation (developer)
area: mobile
Mobile push notifications; features motivated by mobile; issues requiring changes in mobile code.
area: right-sidebar
We have some docs on the user-presence subsystem, here:
https://zulip.readthedocs.io/en/latest/subsystems/presence.html
They're helpful, but there are some important areas they don't cover, or don't make clear. These have caused confusion a few times in the mobile app. Here are some that recently came up:
active
,idle
,offline
. (And/orinactive
? We were using that name in some recent discussions, but I don't now see it in the code. Another reason it'd be good if the exact set of states were documented. 😉 )inactive
is reached by aging from eitheractive
oridle
.idle
doesn't mean "I'm going away now, goodbye". It means "Here I am! Still here! BTW the user hasn't interacted with me for a while."idle
report in reaction to being closed or backgrounded.For recent discussion figuring out what things meant, see this chat thread; discussion at zulip/zulip-mobile#3699; and discussion at zulip/zulip-mobile#3704.
For much of this information, the ideal place is really in and right next to code. Some bits of it are in comments on the
UserPresence
model, and a link to there would be good. For some others, a good comment in an appropriate place, and a link here to that comment, could be a good format. But one way or another we should write it down.Here are points that I don't think came up in the past couple of weeks, but have in the past and would be good to clarify:
getAggregatedPresence
and related functions, and after a couple of rounds (at different times a while ago) of staring at the subsystem docs and at the web implementation and revising this logic, I'm still not particularly confident that they are quite right.The text was updated successfully, but these errors were encountered: