Automation improvements and handling of custom messages fur user status
Follow up to https://github.com/nextcloud/server/issues/31177
Summary
Discussed and approved by @jancborchardt
The current user status automation has no hierarchy for when a status should be overwritten by the automation, and when not. This leads to behaviour such as the automation overwriting custom status messages even though the users intention is not to show the automation message.
For clarity's sake, the following definitions apply:
status or user status: the dot next to the user avatar - green dot, yellow half moon, red circle with white line, none (for invisible):
Status message or message: The combination of emoji and custom text displayed below a users name:
-
Clean up
is_user_definedstatus field in the code Currently, this field is not worked with properly and is used inflationary - making this field practically useless. When cleaned up, use this field to determine who set the status message, not the user status. -
Decouple the user status and the status message. Implement the following:
- status hierarchy
1. INVISIBLE 3. DND 4. AWAY 5. ONLINEThe new "BUSY" status can be removed / ignored for now. The higher status overwrites the lower status but not in reverse.
- Message hierarchy and fixed CONSTs for these messages
1. IN A CALL 2. OUT SICK 3. VACATION 4. OUT OF OFFICE 5. IN A MEETING 6. CUSTOM STATUSHigher message can overwrite lower ones but not in reverse.
-
Leave the status to the availability automation and the heartbeat. A user can overwrite their status according to the hierarchy. The availability automation should only ever overwrite an online status. Check if the OOO status needs to adjust the status too after https://github.com/nextcloud/server/issues/41378 was implemented.
-
Add a restoration mechanism that allows to restore the custom message if one was set before a message type 1-5 was written. (Or adjust the backup functionality to work this way). A new line in the DB should be written for any new message.
-
A new user defined message must overwrite any current message, automated or not. For this to work, a timestamp comparison is needed, and that is why we need 4. If the automated message was set before the custom message, the custom message takes precedence.
-
Extend documentation on how to set up "TRANSPARENT" calendar events to make the automation more accurate, and mention the automation in the Calendar documentation.
sounds like a plan
Is there a option to disable user status automation ? In my company, we prefer to set up the status manually, and for now it's modified automatically each time we have an event in calendar, but we use events also just to organize ourselves and get a notification not to forget something. It's painfull to set up each event as "not busy" each time we create an event (3 clics on thunderbird, and has to think to do this, impossible for a 30 persons team...). If it doesn't already exists, it would be great to be able to enable or disable status automation with calendar, and just keep online/offline status as automatic.
Does this topic also includes, when my status is changed from a calender item to "in meeting" it never get's reset automaticaly after the meetings end time. I need to manually reset the status to online. For my opinion i would like to have more automation. Like Keyboard/Mouse activity sets Status Online or Away and auto reset to online after a calender event is ends.