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

umputun / tg-spam / 29400565840
84%

Build:
DEFAULT BRANCH: master
Ran 15 Jul 2026 08:26AM UTC
Jobs 1
Files 42
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

15 Jul 2026 08:22AM UTC coverage: 83.723% (+0.02%) from 83.704%
29400565840

push

github

web-flow
feat: detect spam in external replies (#429)

adds an opt-in meta check that flags a message replying to a message from another chat (Telegram's `external_reply`). Off by default, mirrors the existing `--meta.forward` check.

**why:** a spam wave hit the radio-t chat: premium accounts posting a short fake testimonial like "Пришло быстро!" that *replies* to a post in an external scam channel ("Билайн Информация") and quotes "Написать менеджеру: @Beeline". The bot only saw the tiny comment, so the classifier and similarity stayed at ham and the LLM was inconsistent on the wording. The real signal, a reply to a known scam channel, lived in `external_reply`, which no check ever inspected.

**what it does:** a message whose `external_reply` points at a genuinely different chat is flagged. The flag is gated on the referenced chat being external: `msg.ExternalReply != nil && (Chat == nil || Chat.ID != msg.Chat.ID)`. `external_reply` also fires for a reply across forum topics within the *same* chat, so keying on presence alone would ban legitimate forum replies. The chat-id guard keeps it to real cross-chat replies, and the observed spam still matches (its origin chat differs from the group).

`ExternalReplyInfo` carries no text or caption in the Bot API, so the check keys on presence, not content. The quoted snippet a spammer selects still arrives via `msg.Quote` and hits the existing content checks as before.

wired through the standard meta path: `--meta.external-reply` / `META_EXTERNAL_REPLY`, the `IsMetaEnabled` aggregate, the web settings UI, the Lua plugin meta table (`req.meta.has_external_reply`), and the listener empty-text guard for parity with forward.

34 of 37 new or added lines in 10 files covered. (91.89%)

8909 of 10641 relevant lines covered (83.72%)

236.07 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
55.24
-0.13% app/main.go
Jobs
ID Job ID Ran Files Coverage
1 29400565840.1 15 Jul 2026 08:26AM UTC 42
83.72
GitHub Action Run
Source Files on build 29400565840
  • Tree
  • List 42
  • Changed 11
  • Source Changed 0
  • Coverage Changed 11
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 9e10821e on github
  • Prev Build on master (#29372019250)
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