Skip to content

spam reporting #7

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

Closed
wants to merge 13 commits into from
Closed

spam reporting #7

wants to merge 13 commits into from

Conversation

komarov
Copy link
Collaborator

@komarov komarov commented Apr 11, 2025

Spam reporting is available for trusted users (org members) via a button on a
spammer's profile page;
processing is done automatically using a new cron task process_spam_reports;
a new section Site Administration > Identity & Access > Spam Reports.

@komarov komarov force-pushed the spamreport branch 6 times, most recently from 8b589eb to 46c36e5 Compare April 18, 2025 14:33
Spam reporting is available for trusted users (org members) via a button on a
spammer's profile page;
processing is done automatically using a new cron task process_spam_reports;
a new section Site Administration > Identity & Access > Spam Reports.
@komarov komarov changed the title WIP: spam reporting spam reporting Apr 18, 2025
@komarov komarov mentioned this pull request Apr 18, 2025
Copy link
Collaborator

@brechtvl brechtvl left a comment

Choose a reason for hiding this comment

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

I only superficially tested it and skimmed the code so far.

Is the plan to upstream this at some point, or just as a local change? If we wanted to upstream this eventually I would have various comments, but probably that's not the plan for now?

It would be good to fix the errors reported by make lint. I like to run that on our patches to catch issues.

@brechtvl
Copy link
Collaborator

Also would be good to run make fmt.

@komarov
Copy link
Collaborator Author

komarov commented Apr 22, 2025

sorry for potential confusion with the force push: all previous commits are combined in one, followups are done as commits on top

@komarov
Copy link
Collaborator Author

komarov commented Apr 22, 2025

Is the plan to upstream this at some point, or just as a local change? If we wanted to upstream this eventually I would have various comments, but probably that's not the plan for now?

I got an impression that gitea is currently not looking for a site-wide moderation mechanism, and that they prefer to delegate it to org members.

I think this to some extent contradicts the direction we are taking, so I don't think this exact approach would ever land upstream to be honest.

@komarov
Copy link
Collaborator Author

komarov commented Apr 23, 2025

I couldn't find a good way to integrate with the existing notification system, as all notifications must be linked to some other object (comment/repo/etc). I have added a simple indicator that is shown to admins when there are pending reports, it is also a link to the corresponding page:
image

@komarov komarov marked this pull request as ready for review April 23, 2025 13:29
@komarov
Copy link
Collaborator Author

komarov commented Apr 23, 2025

Admin view of the profile:
image

Trusted user's view:
image

otherwise ID is not populated
Copy link
Collaborator

@brechtvl brechtvl left a comment

Choose a reason for hiding this comment

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

Seems to work fine overall. I think it's polished enough for us, only have some smaller comments left.

@komarov komarov requested a review from brechtvl April 24, 2025 10:42
@komarov
Copy link
Collaborator Author

komarov commented Apr 24, 2025

All outstanding remarks were incorporated in the latest commits, please take another look.

Copy link
Collaborator

@brechtvl brechtvl left a comment

Choose a reason for hiding this comment

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

Thanks, looks good now.

@komarov
Copy link
Collaborator Author

komarov commented Apr 24, 2025

Ok, i'll update the patch PR now. Thank you for the review!

@komarov komarov closed this Apr 24, 2025
komarov pushed a commit that referenced this pull request Apr 24, 2025
komarov added a commit that referenced this pull request Apr 24, 2025
Spam reporting patch

Spam reporting is available for trusted users (org members) via a button on a
spammer's profile page;
processing is done automatically using a new cron task process_spam_reports;
a new section Site Administration > Identity & Access > Spam Reports.

See #7 for the code review.

---------

Co-authored-by: Oleg Komarov <[email protected]>
komarov added a commit that referenced this pull request Apr 24, 2025
Spam reporting is available for trusted users (org members and admins) via a
button on a spammer's profile page;
a new section Site Administration > Identity & Access > Spam Reports;
a new "pending spam reports" indicator in the header for admins.

See #7 for the code review.

---------

Co-authored-by: Oleg Komarov <[email protected]>
@komarov komarov deleted the spamreport branch April 24, 2025 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants