zulip / zulip

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
https://zulip.com
Apache License 2.0
21.55k stars 7.82k forks source link

Personal presence dot should match presence status shown to other users #18846

Open alya opened 3 years ago

alya commented 3 years ago

It is possible to disable personal presence status sharing by de-selecting "Display my availability to other users when online" in the Settings menu. When enough time has passed, the user looks to be offline to others.

However, we still show the user as being online and "Active now" when they look at their own availability. This is very confusing, and makes the user wonder whether the feature to disable availability sharing is working correctly

Instead, one's own availability should appear the same as it does for other users.


Note:

The most important part of this was fixed, in that we now show you as offline if you've configured yourself to be shown as offline. However, the version we merged will still never show you as orange/idle, even when other users are seeing that. Leaving this open until we resolve that.

zulipbot commented 3 years ago

Hello @zulip/server-sidebars members, this issue was labeled with the "area: right-sidebar" label, so you may want to check it out!

biradarganesh25 commented 3 years ago

Hey I'd like to work on this - might take a bit more time as this will be my second issue on this repo. If anyone else is working on this, please let me know. I'll claim it using the bot in a day or two.

biradarganesh25 commented 3 years ago

After going through the code I have come up with the following solution I want to implement: every time the user changes the the "Display my availability to other users when online" setting, we can catch this change in change_notification_setting function (this seems to be the function where any settings change end up finally). If it turns out that the user is changing the the presence enabled setting, we can use this function update_presence_info to first change the users status locally and then proceed with the normal flow.

Would this be a feasible solution? Please let me know if there could be a better way to do this.

timabbott commented 3 years ago

@biradarganesh25 we don't want to do work in change_notification_setting, since that only affects the current table; we should instead do it in the server_events_dispatch.js handler for the relevant event type generated by changing that setting.

timabbott commented 2 years ago

The most important part of this was fixed, in that we now show you as offline if you've configured yourself to be shown as offline. However, the version we merged will still never show you as orange/idle, even when other users are seeing that. Leaving this open until we resolve that.

timabbott commented 2 years ago

Ack, I think "complete #18846" in the commit message auto-closed it.