Auto change status and idle message based on calendar event


We’re heavily using Talk for direct messaging between our nurses, pharmacists, doctors and others, but manually switching the status to dnd or online everyday seems complicated and people get messages outside their working hours.

I’m planning to make a python script based on the caldav api and the ocs/status api to make sure everyone get the notifications and messages only when wanted (ie. They are set to “online” only when a “working” event exist at a given time in their respective calendar), and is resting with the dnd status any other time which prevent any notifications to spawn on their devices.

Would anyone have a better idea about solving this problem?


1 Like

to answer our problem I made this :

please note that I’m not a dev, and my first public project, so it might use some polishing for your own use.
unfortunatly the API doesn’t let a single user (ex. the admin) change the other users status, so it require a user/password for every user you want to set this up. The users.json file is here for that.

I’m hoping it can help. I’m guessing an app would be more appropriate, but that’s above my level…