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

umputun / tg-spam / 19082335171
83%

Build:
DEFAULT BRANCH: master
Ran 04 Nov 2025 08:50PM UTC
Jobs 1
Files 31
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

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

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).

4 of 4 new or added lines in 1 file covered. (100.0%)

1 existing line in 1 file now uncovered.

6152 of 7520 relevant lines covered (81.81%)

272.61 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
84.56
-0.11% app/webapi/webapi.go
Jobs
ID Job ID Ran Files Coverage
1 19082335171.1 04 Nov 2025 08:50PM UTC 31
81.81
GitHub Action Run
Source Files on build 19082335171
  • Tree
  • List 31
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 5e44065a on github
  • Prev Build on master (#18640987819)
  • Next Build on master (#19248145793)
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