-
Notifications
You must be signed in to change notification settings - Fork 15
Feat/spam digest job #905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/spam digest job #905
Conversation
- Introduced SpamDigestEvent to notify admins through Decidim’s notification system - Added I18n translations for AI spam digest summaries
d7719b0 to
1d46b3a
Compare
AyakorK
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of reviews, but we probably don't need to fix everything, some of them might be critical but other issues are reported just to keep a trace on it !
…don't have organization.resource_title. So I refacto using translated_attribute
…the hardcoded http protocol
…cted by mailer Decidim
… spec: perform_now without (argument)
|
Hello @BarbaraOliveira13 , thx for your PR !!! I try to run the job I think it may be related to this line https://github.com/OpenSourcePolitics/decidim-app/pull/905/files#diff-236c78d077b1c09f66a2df7f331aefd14b4c5c86155cd2a12f2f2fb42038ff26R53, because decidim_moderations table has no column decidim_organization_id |
Hello @Stef-Rousset Oh, I had the right chain before I think... I should changed too much time :s |
|
Fail CI is not relevant of my changes. It's a flaky CF Redesigned upload modal flaky test #10961 @Stef-Rousset you can re-run the job, I fix it ! 🙏 |
|
Next step:
|
hello @BarbaraOliveira13 , great job, I run the code locally and everything works !!! |
Thanks ! done 👍 |
moustachu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job !
✉️ Feature: Decidim-AI — Spam Summary Digest Event (Weekly / Daily)
🔧 This PR also fix a CI part by normalize nl local file.
MAIN SUBJECT :

This PR adds a Decidim digest system that aggregates spam reports detected by Decidim-AI and sends a daily or weekly summary email, to each organization’s administrators (selon leur choix de config 'frequency').
It integrates with Decidim EventsManager and EmailEvent notification system.
🧠 Technical Notes
resource: organization ensures Decidim’s BaseEvent behaves correctly
(the spam digest concerns all types of content: proposals, projects, comments, etc.)
If need more details, cf conclusion in the issue
🧭 Steps to Reproduce
(Replace xxx with the password stored in Passbolt)
5. Restart the server:
spring stop && bundle exec rails s10. Create the reporting_user (Spam Bot): script for console:
bundle exec sidekiqExpected output:

📌 Related Issues
https://github.com/orgs/OpenSourcePolitics/projects/26/views/1?filterQuery=assignee%3A%40me&pane=issue&itemId=129336496&issue=OpenSourcePolitics%7Cintern-tasks%7C114
Tasks
📷 Screenshots
Please add screenshots of the changes you're proposing if related to the UI
Extra information
For the DATA Team:⚠️ The digest is not stored in any table — it’s generated dynamically when EventsManager.publish is called.