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

umputun / tg-spam / 19082335171 / 1
83%
master: 83%

Build:
DEFAULT BRANCH: master
Ran 04 Nov 2025 08:50PM UTC
Files 31
Run time 2s
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

04 Nov 2025 08:45PM UTC coverage: 81.809% (-0.003%) from 81.812%
19082335171.1

push

github

web-flow
Skip spam checks for anonymous admin posts (#331)

* feat: skip spam checks for anonymous admin posts

Implements automatic exclusion of anonymous admin posts from spam detection while maintaining spam checks for channel forwards and regular users.

Changes:
- Added check in listener.go to skip spam detection when msg.SenderChat.ID == fromChat
- Added comprehensive test coverage with 4 test cases
- Updated README.md to document the behavior

Behavior:
- Anonymous admin posts (when admins post "as the group") skip spam check
- Channel auto-forwards (SenderChat.ID != chat ID) still checked for spam
- Regular user messages (no SenderChat) still checked for spam
- Works uniformly across primary group, testing chats, and all allowed chats

The fix compares msg.SenderChat.ID to fromChat (the actual chat the message came from) rather than l.chatID, ensuring proper handling of anonymous admin posts in testing chats configured via --testing-id.

Related to #330

* docs: add clarifying comment for SenderChat check

Explains that when admins post 'as the group', SenderChat.ID equals the group's chat ID. This clarifies why checking ID != 0 is sufficient (it's a struct value, not a pointer).

6152 of 7520 relevant lines covered (81.81%)

272.61 hits per line

Source Files on job 19082335171.1
  • Tree
  • List 31
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 19082335171
  • 5e44065a on github
  • Prev Job for on master (#18640987819.1)
  • Next Job for on master (#19248145793.1)
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