Skip to content
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

[MODERATION] automatiser la detection des scams #548

Merged
merged 13 commits into from
Feb 13, 2024

Conversation

vincentporte
Copy link
Contributor

@vincentporte vincentporte commented Feb 7, 2024

Description

🎸 Les utilisateurs non authentifiés pourront reprendre le droit post_without_approval
🎸 Les messages contenant des balises html, écrits dans une langue dlfférente de celle definie dans LANGUAGE_CODE ou postés par des utilisateurs dont le nom de domaine est en liste noire sont automatiquement désapprovés.

Type de changement

🎢 Nouvelle fonctionnalité (changement non cassant qui ajoute une fonctionnalité).
🚧 technique

Points d'attention

🦺 Le modele BouncedDomainName est ajouté
🦺 Isolation de la logique business dans notification.utils.py
🦺 Exploitation de la logique business dans les CreateView, UpdateView classique et htmx

🦺 fusionner la PR #549  de mise à jour des dépendances auparavant
⚠️ langdetect est sensible à la longueur du contenu pour déterminer le langage. Pour eviter de rendre les tests fragiles, les content des post sont hydratés avec faker.paragraph(nb_sentences=5)) au lieu de faker.text()

@vincentporte vincentporte added the python Pull requests that update Python code label Feb 7, 2024
@vincentporte vincentporte self-assigned this Feb 7, 2024
@vincentporte
Copy link
Contributor Author

@francoisfreitag : flaky f…g test : FAILED lacommunaute/forum_conversation/tests/tests_views.py::TopicUpdateViewTest::test_topic_is_marked_as_read_when_updated - AssertionError: 1 != 0

@vincentporte vincentporte force-pushed the vincentporte/auto_disapprobation branch 2 times, most recently from b71d001 to bb59086 Compare February 8, 2024 13:00
@vincentporte
Copy link
Contributor Author

@francoisfreitag : flaky f…g test : FAILED lacommunaute/forum_conversation/tests/tests_views.py::TopicUpdateViewTest::test_topic_is_marked_as_read_when_updated - AssertionError: 1 != 0

solved

@vincentporte vincentporte marked this pull request as draft February 8, 2024 13:05
@vincentporte vincentporte force-pushed the vincentporte/auto_disapprobation branch from bb59086 to d47ef54 Compare February 8, 2024 14:13
@vincentporte vincentporte marked this pull request as ready for review February 8, 2024 14:15
Copy link
Contributor

@francoisfreitag francoisfreitag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ça m’a l’air de bien fonctionner 👍


Le message de commit « install langdetect python lib (to be rebased after distinct PR to update libs) » peut être mis à jour.

lacommunaute/notification/models.py Outdated Show resolved Hide resolved
lacommunaute/notification/models.py Outdated Show resolved Hide resolved
lacommunaute/forum_conversation/tests/tests_views.py Outdated Show resolved Hide resolved
lacommunaute/forum_conversation/tests/tests_views.py Outdated Show resolved Hide resolved
lacommunaute/forum_conversation/tests/tests_views.py Outdated Show resolved Hide resolved
lacommunaute/forum_conversation/tests/tests_views.py Outdated Show resolved Hide resolved
lacommunaute/forum_conversation/views.py Show resolved Hide resolved
lacommunaute/forum_moderation/utils.py Outdated Show resolved Hide resolved
lacommunaute/forum_moderation/utils.py Outdated Show resolved Hide resolved
@vincentporte vincentporte force-pushed the vincentporte/auto_disapprobation branch 3 times, most recently from 984e3ff to 1283229 Compare February 12, 2024 15:00
…rated anonymous posts possible again. Only detected scams are automatically disapproved. Temporary warning banners for anonymous posters are deleted"
@francoisfreitag
Copy link
Contributor

Je te laisse vérifier “Remove those ugly mock.patch” avant de merger ;)

@vincentporte
Copy link
Contributor Author

Je te laisse vérifier “Remove those ugly mock.patch” avant de merger ;)

tu m'as bien fait marrer 🤣 je t'appelerai Léon maintenant 🔪

@vincentporte vincentporte merged commit a919bab into master Feb 13, 2024
4 checks passed
@vincentporte vincentporte deleted the vincentporte/auto_disapprobation branch February 13, 2024 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants