Filter invalid notifications from emails being sent#15002
Merged
greenwoodt merged 18 commits intodevelopfrom Dec 2, 2025
Merged
Filter invalid notifications from emails being sent#15002greenwoodt merged 18 commits intodevelopfrom
greenwoodt merged 18 commits intodevelopfrom
Conversation
…m into fix/disgest-notifications
greenwoodt
requested changes
Nov 28, 2025
Member
greenwoodt
left a comment
There was a problem hiding this comment.
Ran your steps and my user "John Doe" at "hi@example.org" in develop and still didn't get an email that it was moderated.
Only the admin and space admins on the assembly I followed got emails
greenwoodt
requested changes
Nov 28, 2025
Member
greenwoodt
left a comment
There was a problem hiding this comment.
On the branch we can still see with moderated content visible (comments) in the digest:

However the component is actually moderated, so its a partial fix but while some content is visible, the code within the notifications_digest_mailer is written to obstructe that information from the followers perspective, so this will need another look @alecslupu.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


🎩 What? Why?
This PR fixes some bugs with the notifications:
📌 Related Issues
Link your PR to an issue
Testing
The main idea is to create a simulation on what is happening when an user that follows a space receives a notification email for a resources that has been moderated? That resource should not be sent via email.
Decidim::Notification.delete_allDecidim::User.first.update_attribute(:digest_sent_at, nil)Decidim::Notification.update_all(created_at: 30.hours.ago)- you should have 3 recordsbin/rails decidim:mailers:notifications_digest_dailyDecidim::User.first.update_attribute(:digest_sent_at, nil)bin/rails decidim:mailers:notifications_digest_dailyScenario 2:
📷 Screenshots
Please add screenshots of the changes you are proposing
