Live email notifications with filter
Last modified by Ilie Andriuta on 2023/09/21 16:24
Steps to reproduce
Preconditions:
- The Mail Sending should be configured: Configure Mail Sending
- An user with an email address set in the profile already exists
- A set of nested pages are already created: http://localhost:8080/xwiki/bin/view/Main/a/b/c/d/e/
- Eventually, go to webapps\xwiki\WEB-INF\xwiki.properties and set notifications.emails.live.graceTime = 0 to enable the sending of e-mails instantly. Make sure the line is not commented out (doesn't have an # at the start of it).
- Log in as a simple user (with email address in the profile)
- Click on the bell in the top right corner
- Make sure the Watch Notifications Toggles are ON
- Click on Settings, in the right side of Notifications
- Set "Email Frequency" to Live
- Set ON all the options in the Email column
- Click on the "Add filter" button from Custom Filters section
- Location -> Page "c": "Home/a/b/c/"
- Action -> Ignore the event
- Events type (Pages) -> A page is modified
- Channel -> Email
- Log in with another user or with Admin
- Update all pages a/b/c/d/e
Expected results
E-mails are sent to the users that have the notifications set to ON (Live) only for update actions on pages 'a' and 'b'.