notifications icon indicating copy to clipboard operation
notifications copied to clipboard

"sending unseen notifications as email" not enabled by default

Open XueSheng-GIT opened this issue 2 years ago • 2 comments

NC23 provides an email notification for unseen notifications (see https://github.com/nextcloud/notifications/pull/1058 and https://github.com/nextcloud/notifications/pull/1074). But users still complain about not receiving any such notifications.

Steps to reproduce

  1. Create a new user.
  2. Send a message (talk) to this new user.
  3. Wait a couple of hours for the email notification to arrive.

Expected behaviour

Email notification shall be sent to this new user.

Actual behaviour

No email notification is sent to this new user. A user must first access his notification settings, so that "Sending unseen notifications as email" is activated. This also applies for all users if you upgrade from NC22 to NC23. You can double check "oc_notifications_settings" table to see that a new entry is only done if a user does access his notification settings page. The typical user does not know that he has to access his settings first, so that this feature is activated. When accessing the notification settings, the default is 3h which also implies that this setting was already activated by default (which is currently not the case).

Server configuration

Operating system: Ubuntu 20.04 LTS

Web server: apache2

Database: mariadb (mysql)

PHP version: 7.4

Nextcloud version: NC23.0.3

XueSheng-GIT avatar Mar 23 '22 15:03 XueSheng-GIT

Right, not sure what happened there... must have been off my mind. Default should be inserted also in the BeforeTemplateRenderedListener, LoginEvent or something similar which happens more often but not on each request as it adds another query to the db.

nickvergessen avatar Mar 23 '22 16:03 nickvergessen

Why don't you add defaults during updates/upgrades/migrations? That's probably much better than increasing the load on running instances by some [arbitrary] trigger. Just show a heads up for admins under settings/admin/overview to run the expensive tasks (dunno the occ cmd right now).

You can double check "oc_notifications_settings" table to see that a new entry is only done if a user does access his notification settings page.

Besides, shouldn't a default apply without requiring a trigger or DB entry??

EngelPika32 avatar Aug 31 '22 14:08 EngelPika32

Fixed with https://github.com/nextcloud/notifications/pull/1266

nickvergessen avatar Nov 16 '22 11:11 nickvergessen