Announcement center discussion

Yes I used the following steps:

  1. Unzip zip-file in /root
  2. Move /var/www/nextcloud/apps/announcementcenter to announcementcenter.bak
  3. Move /root/announcementcenter to /var/www/nextcloud/apps
  4. Go to web-page, receive error 500
  5. occ give previous error

But now you mention NC 10, I am still on 9.0.53, guess 2.0.0 is NC 10 and up?

See first line below the version number :wink:

1 Like

Oh dear, that doesn’t look good on me :slight_smile: I was so eager to test it out that I missed that bit. Sorry about this. Will start upgrading to NC 10 RC1, and then try the new AnnouncementCenter.

1 Like

So, upgrade went smoothy:

Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Set log level to debug
Turned on maintenance mode
Checking whether the database schema can be updated (this can take a long time depending on the database size)
Done
27/27 [============================] 100%
Checked database schema update
Checking updates of apps
Checked database schema update for apps
Updating database schema
Updated database
Updating …
Add read permissions for existing announcements
Done
1/1 [============================] 100%
Updated to 2.0.0-RC1
Drop old database tables
Done
31/31 [============================] 100%
Remove old (< 9.0) calendar/contact shares
Done
4/4 [============================] 100%
Fix permissions so avatars can be stored again
Done
2/2 [============================] 100%
Repair unmerged shares
Done
5/5 [============================] 100%
Starting code integrity check…
Finished code integrity check
Update successful
Turned off maintenance mode
Reset log level

Edit: had a cron issue. Now it is fine.

Made few tests, and it looks like non-admin cannot access the webpage apps/announcementcenter/ to read the accouncement, from the menu or from the notification popup.

more features:

  • add an option so the author should also receive the notification,
  • broadcast the notification to the windows/android/ios client

If you tell me the use case for this?

Desktop client is already done in client v2.2, for mobile it’s planned Implement notifications API with mobile clients

Fix for this is coming soon

Fix is in Fix the page for non-admins by nickvergessen · Pull Request #22 · nextcloud/announcementcenter · GitHub

Feel free to test and report back.

Cool stuff! :slight_smile:
Are there E-Mails sent to the users for a new announcement?
Or is it only visible via the Nextcloud interface?

1 Like

Well the app itself does not send emails. You can get emails for the activities from the activity app for now.
But my long term goal is to replace the need of emails with notifications being available via all the sync clients. When your phone/laptop already tells you, there is no need to have an email.

1 Like

Well, to be sure that it works :blush:

I’ll patch later today and do some more testing

I have some people who would only use the web-client on irregular basis. For those it would be helpful if an email could be sent out.

Not sure how this could be managed, maybe an extra option in the user profile where they can opt-in for email announcements.

I don’t think I want to support a third channel of notifying a user, sorry. As said the sync clients also get the notifications. When people don’t use the UI nor a Sync client, …

That is OK, I can understand your point of view. Just trying to relay some different cases, which might not come so often, or is not really applicable.

@nickvergessen sorry sir, but I patched script.js and templates/main.php and nothing changed.

But I took the liberty to move lib/AppInfo/Application.php into appinfo/application.php and now it is working

Edit: well, almost … the notification icon is not going away. but this way a non-admin can read/comment and create new announcement if the user is in a group added to the correct list.

Press the little “X” on the notification? Maybe we should throw the notification away, when the announcement was read.

looks like I don’t have notifications icons anymore now :smile: and lot of warning in log. I’ll reset the database later tonight and do more test from scratch.

Might be the fact that I moved the container into appinfo/

Alright…

I disable and remove your apps, dropped your 2 tables in the database and truncate the oc_notifications. Reinstalled your .zip and I needed to apply your last patch (script.js+main.php). I also needed to move the Container from lib/ to appinfo/.

Everything is almost working now, despite few lines in the logs. Something funny:

If a user is in a group that can create an announcement, he won’t have the notification icon. If I remove that group from the list, the user from that group will see the notification icon, for the announcement made before. I don’t know if it is clear, so:

- User A is in group Admin.
- User B is in group Moderator.
- User A add group Moderator to the AnnouncementCenter list.
- User A create a Announcement.
- User B can read the Annoucement, but won't have the notification icon.
- User A remove group Moderator from the AnnouncementCenter list.
- User B can now see the notification icon.

I think that if User B (while the Moderator group is in the list) create an Announcement, User A do not have the notification icon.

But what if there are multiple notifications which haven’t been read? Would the notification disappear once the first one is read? I would expect as long as unread notification are there, that the icon should remain. Then once all are read, it should disappear.

Right now, you remove notifications one-by-one by clicking the X. But it seems that if you are in a group that can create new announcement, all notification are hidden; until your group is removed from the list, then the notifications are back. Well, ironically, because you have to see the bell icon to remove notifications you will have all the old notifications back when your rights to create new announcement are revoked.

(from what it seems to be)

Notifications are generated by a background job, so make sure that is triggered/run between posting and checking for notifications.