mattermost / desktop

Mattermost Desktop application for Windows, Mac and Linux
Apache License 2.0
2.03k stars 829 forks source link

Sync User Presence to Host OS's Lock Status #1187

Open theriverman opened 4 years ago

theriverman commented 4 years ago

I would like to improve Mattermost's presence handling when used in conjunction with the desktop application. On Windows and macOS, the user's have the opportunity to lock their workstations with a simple key combination (Windows+L or Ctrl + CMD + Q).

When a user locks their desktop, their status should become Away because they will not see new messages and will not be able to reply. This is the behaviour SkypeForBusiness does as well and it's basically a corporate standard due to this.

My initial proposal was synchronising the user's SfB status to Mattermost, but after some recent investigation I came to the conclusion it would not be a robust solution.

In the meanwhile, Electron 3.0.0 finally added support for watching the host OS's locked/unlock status changes and I'm confident this must the way how SfB implements this feature.

In case you agree with this proposal and willing to add a Help Wanted tag, I can immediately start working on the implementation myself (for both mattermost-desktop and mattermost-webapp).

deanwhillier commented 4 years ago

Conversation can be found here: https://community.mattermost.com/core/pl/ok3wo5gzop81bdkcg9e34zorpc

devinbinnie commented 2 years ago

Created a JIRA ticket to investigate at some point: https://mattermost.atlassian.net/browse/MM-40569

theriverman commented 2 years ago

Conversation can be found here: https://community.mattermost.com/core/pl/ok3wo5gzop81bdkcg9e34zorpc

At one point the conversation has been moved to the Developers: Desktop App channel: https://community.mattermost.com/core/pl/a7n48be13jfgu8ujquzm6yp9nw

ppar commented 2 years ago

I would very much like to see this implemented.

In fact, it's rather surprising that the client doesn't set your presence automatically. This has been the default behavior in all IM applications for the last couple of decades - either based on mouse activity or the workstation being locked - long before e.g. Skype for Business or Lync had seen the light of day.

ppar commented 2 years ago

In the meanwhile, here's a workaround script (Linux/KDE) for anyone else encountering this ticket: https://github.com/ppar/mattermost-autoaway