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

umputun / tg-spam / 33487001189
84%

Build:
DEFAULT BRANCH: master
Ran 01 Sep 2026 08:31AM UTC
Jobs 1
Files 43
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

01 Sep 2026 08:26AM UTC coverage: 84.026% (+0.05%) from 83.974%
33487001189

push

github

web-flow
Add documents-only meta check (#447)

* feat(spamcheck): add HasDocument to MetaData

Transport field for the upcoming opt-in documents meta check: flags a
message carrying a document (file attachment) with no or short text.
Populated and consumed by later tasks.

* feat(tgspam): add DocumentsCheck meta check

Mirrors VideosCheck: flags a message carrying a document when it has no
text or text shorter than minTextLen. Not wired up yet - the CLI flag,
settings field, and transform plumbing that populate HasDocument land in
later tasks.

* feat(lua): expose has_document to plugins

Add has_document field to the Lua meta table so plugins can check
for document attachments. Extend the meta-fields test to verify
the new field is accessible.

* feat: wire document flag through bot/events

Add WithDocument to bot.Message, set it in transform when
msg.Document is present (covers forwarded files and GIF
animations, which Telegram also flags as documents), map it to
spamcheck.Request.Meta.HasDocument in bot.OnMessage, and let a
caption-less document message pass the listener's intake guard.

* feat(config): add Meta.DocumentsOnly opt-in setting

Plain opt-in bool following the Meta.Forward/Meta.ExternalReply
precedent: default off, contributes to IsMetaEnabled(), not in
zeroAwarePaths since zero already means disabled.

* feat: wire --meta.documents-only CLI flag to the detector

Connects settings.Meta.DocumentsOnly to tgspam.DocumentsCheck(settings.MinMsgLen),
turning on the documents meta check end to end: CLI flag/env var, optToSettings
mapping, and registration in makeDetector.

* feat(webapi): expose meta.documents-only in web settings UI

Wires the DocumentsOnly meta field through the server-side
authoritative master toggle (form-field list, on-branch parse,
clear-branch), the settings.html edit checkbox and read-only row,
and the e2e meta round-trip test. Corrects the stale 12/13-field
comments to the current 14 fields read by IsMetaEnabled().

* docs: d... (continued)

46 of 47 new or added lines in 10 files covered. (97.87%)

2 existing lines in 1 file now uncovered.

9132 of 10868 relevant lines covered (84.03%)

243.6 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
55.71
0.13% app/main.go

Coverage Regressions

Lines Coverage ∆ File
2
94.07
-0.21% lib/tgspam/detector.go
Jobs
ID Job ID Ran Files Coverage
1 33487001189.1 01 Sep 2026 08:31AM UTC 43
84.03
GitHub Action Run
Source Files on build 33487001189
  • Tree
  • List 43
  • Changed 12
  • Source Changed 0
  • Coverage Changed 12
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 58e75e81 on github
  • Prev Build on master (#32425913176)
  • Next Build on master (#33487964548)
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