Notify all users when maintenance mode

Hi all.

I am experimenting with the notification feature. Especially that you can push ad-hoc notifications to individual users using OCC.

I would like to know if there is a mass-notify option?

I do scripted update and upgrades. In the script I have added a notification to myself before the update is initiated and then again after maintenance mode is off again. It works brilliantly. Now I wish to expand this to notify all users through the notification that will “pop up” in their nextcloud clients aswell as in their browser if they are in NC.

This is so far what I do:

sudo -u www-data php8.2 /var/www/nextcloud/occ notification:generate [UID] 'NC Update initiated. Maintenance mode enabled in a moment. Notification will follow when NC is available again.'

However this requires me to specify the specific userid. I would like to hit all users, but so far has not found an easy way to do so. Before I ventures into an extra loop in my script (occ user:list) to extract the UID from each listed user, I would like to first explore the options. Any suggestions?

HI,

Did you take a look at nextcloud/notifications on github?

Maybe this may answer your question and provide a solution: Allow to send notifications to all members of a group · Issue #121 · nextcloud/notifications · GitHub