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

umputun / tg-spam / 17341879765
83%

Build:
DEFAULT BRANCH: master
Ran 30 Aug 2025 09:06AM UTC
Jobs 1
Files 29
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

30 Aug 2025 09:02AM UTC coverage: 81.842%. First build
17341879765

push

github

web-flow
Add aggressive spam cleanup feature (#316)

* Add aggressive cleanup to delete spammer's message history

Implement optional aggressive cleanup feature that deletes all recent
messages from a spammer when banned via /spam or /ban commands.

Features:
- Asynchronous deletion in background goroutine (non-blocking)
- Rate limiting at 30 messages/second to respect Telegram API limits
- Consecutive failure handling with 5-strike limit
- Configurable message limit (default: 100, max: 10000)
- Admin chat notification showing deletion count
- Database indexes for efficient message queries

Configuration:
- --aggressive-cleanup: enable the feature (default: disabled)
- --aggressive-cleanup-limit: max messages to delete per user

Includes comprehensive tests for deletion logic, error handling, and
rate limiting scenarios.

* Remove unnecessary configuration validation for aggressive cleanup limit

The validation was inconsistent with the rest of the codebase which trusts user configuration and relies on defaults.

* Clarify rate limiting comment to reflect actual rate

The comment now accurately states that we use 35ms delay (~28.6 msg/sec)
to stay safely below Telegram's 30 msg/sec limit, rather than implying
we hit exactly 30 msg/sec.

57 of 66 new or added lines in 4 files covered. (86.36%)

5269 of 6438 relevant lines covered (81.84%)

121.27 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
64.5
app/main.go
2
77.2
app/storage/locator.go
5
82.07
app/events/admin.go
Jobs
ID Job ID Ran Files Coverage
1 17341879765.1 30 Aug 2025 09:06AM UTC 29
81.84
GitHub Action Run
Source Files on build 17341879765
  • Tree
  • List 29
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 433086f4 on github
  • Prev Build on master (#17341729857)
  • Next Build on master (#17341929659)
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

© 2025 Coveralls, Inc