• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

umputun / tg-spam / 18640987819
83%

Build:
DEFAULT BRANCH: master
Ran 20 Oct 2025 03:21AM UTC
Jobs 1
Files 31
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

20 Oct 2025 03:16AM UTC coverage: 81.812% (+0.06%) from 81.753%
18640987819

push

github

web-flow
feat(reports): implement user spam reporting feature (#322)

* docs(plan): add user spam reporting feature implementation plan

add comprehensive plan for /report command allowing regular users to report
spam messages for admin review. key features:

- separate Reports storage module in storage/reports.go
- configurable report threshold and rate limiting
- admin notification with approve/reject/ban reporter buttons
- deduplication of reports for same message
- follows existing storage patterns (ApprovedUsers, DetectedSpam)

technical details:
- new reports table with proper indexing and GID support
- admin_msg_id DEFAULT 0 to avoid NULL handling issues
- INSERT...ON CONFLICT...DO NOTHING for duplicate prevention
- report cleanup after 7 days if threshold not reached

plan includes 11 iterations with detailed implementation steps and patterns

* feat(storage): implement reports storage for user spam reporting

add Reports storage implementation with full PostgreSQL and SQLite support:
- Report struct with explicit notification_sent flag and admin_msg_id fields
- CRUD operations: Add, GetByMessage, GetReporterCountSince, UpdateAdminMsgID, DeleteReporter, DeleteByMessage
- automatic cleanup of old unreported reports (7-day expiration)
- Reports interface in events package with generated mocks
- comprehensive test coverage on both SQLite and PostgreSQL
- database-agnostic query handling with r.Adopt() for placeholder conversion

related to user spam reporting feature (iteration 1 complete)

* feat(reports): add configuration and rate limiting for user spam reporting

implement iteration 2 of user spam reporting feature:
- add report configuration struct with threshold, rate limit, and rate period fields
- create reports storage instance and wire to telegram listener and admin handler
- implement checkReportRateLimit method with proper validation and error handling
- add comprehensive tests covering all rate limiting scenarios
- update plan documentation w... (continued)

616 of 768 new or added lines in 6 files covered. (80.21%)

6149 of 7516 relevant lines covered (81.81%)

273.89 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
87.13
1.0% app/events/events.go
19
76.5
-2.09% app/events/listener.go
27
62.77
-0.83% app/main.go
28
79.86
app/storage/reports.go
76
85.27
app/events/reports.go
Jobs
ID Job ID Ran Files Coverage
1 18640987819.1 20 Oct 2025 03:21AM UTC 31
81.81
GitHub Action Run
Source Files on build 18640987819
  • Tree
  • List 31
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • debcd7eb on github
  • Prev Build on master (#18521207306)
  • Next Build on master (#19082335171)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc