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

umputun / tg-spam / 36333994753
84%

Build:
DEFAULT BRANCH: master
Ran 27 Sep 2026 04:43PM UTC
Jobs 1
Files 44
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

27 Sep 2026 04:38PM UTC coverage: 84.985% (+0.2%) from 84.783%
36333994753

push

github

web-flow
fix(events): report ban outcomes accurately (#463)

* fix(events): report ban outcomes accurately

The user-report ban paths called banUserOrChannel, logged any error at
WARN and carried on. When Telegram rejected the ban the reported user
stayed in the chat while the admin notification claimed they were
banned, and the report rows and inline keyboard were already gone, so
there was nothing left to retry from.

banOutcome names what actually happened, mirroring the wording admin.go
uses for warn auto-bans. It checks the mode before the error because
banUserOrChannel returns nil for dry and training without calling
Telegram, so nil there means the ban was suppressed, not performed.

callbackReportBan and callbackReportBanReporterConfirm now ban first
and only delete the message, resolve the reports and strip the keyboard
once the ban succeeded or the mode suppressed it. On failure the
notification gains a "ban failed" line while the rows and buttons stay
in place. The failure edit sends the current keyboard back, since an
edit without one removes it, and the note is added once however many
times the button is pressed; the check matches the note as Telegram
returns it, rendered without its markdown.

Both report paths gated the reported-message delete on !dry alone, so
training deleted messages while suppressing the ban. The gate is now on
the mode, not on the error, for the reason above.

executeAutoBan gets the same training gate and carries the ban outcome
into its notification, which still has no buttons.

* fix(events): keep the ban failure reason out of italics, mask the bot token

The ban failure note put the escaped reason inside an italic span.
Legacy Markdown doesn't honor an escaped underscore inside an entity,
so a reason such as "Bad Request: USER_ID_INVALID" made Telegram reject
the whole message, and the auto-ban notifications, sent without a
plain-text fallback, never reached the admin chat. The reason now
follows a plain prefix, and rep... (continued)

87 of 91 new or added lines in 3 files covered. (95.6%)

9543 of 11229 relevant lines covered (84.99%)

229.1 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
85.64
1.16% app/events/listener.go
1
88.45
1.85% app/events/reports.go
Jobs
ID Job ID Ran Files Coverage
1 36333994753.1 27 Sep 2026 04:43PM UTC 44
84.99
GitHub Action Run
Source Files on build 36333994753
  • Tree
  • List 44
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • f37df680 on github
  • Prev Build on master (#36160447164)
  • Next Build on master (#36336116860)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc