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

umputun / tg-spam
84%

Build:
DEFAULT BRANCH: master
Repo Added 06 Dec 2023 12:31AM UTC
Files 42
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

LAST BUILD ON BRANCH master
branch: master
CHANGE BRANCH
x
Reset
  • master
  • 12-provide-flag-to-not-remove-user-after-unban
  • abnormal-spacing
  • add-from-detected-spam
  • add-lua-user-fields
  • add-shell-completions
  • add-slog
  • admin-info
  • alkk/master
  • approved-users-ui
  • audio-check
  • autoadd-ham
  • ban-user-instead-of-restriction
  • callback
  • cas-retry-fix
  • check-by-id
  • chore/playwright-go-v0.6100.0
  • chore/samples-dead-query
  • chore/update-x-net
  • ci/fix-paths-ignore
  • ci/pin-playwright
  • ci/restore-push-ref-filters
  • ci/workflow-hardening
  • classifier-unlearn
  • clean-invisible-chars
  • clean-msg-fix
  • db-backup
  • dedup-samples
  • dependabot
  • dependabot/github_actions/github-actions-updates-20c91dd2a4
  • dependabot/github_actions/github-actions-updates-fcf4e41b5c
  • dependabot/go_modules/_examples/simplechat/github.com/umputun/tg-spam-1.18.0
  • dependabot/go_modules/_examples/simplechat/go-modules-updates-0c570b14c2
  • dependabot/go_modules/_examples/simplechat/go-modules-updates-28ef041b99
  • dependabot/go_modules/_examples/simplechat/go-modules-updates-2c4077a24b
  • dependabot/go_modules/_examples/simplechat/go-modules-updates-4af97a05b0
  • dependabot/go_modules/_examples/simplechat/go-modules-updates-75e783174d
  • dependabot/go_modules/_examples/simplechat/go-modules-updates-796ea05e18
  • dependabot/go_modules/_examples/simplechat/go-modules-updates-8d185506e8
  • dependabot/go_modules/_examples/simplechat/go-modules-updates-9e39e63601
  • dependabot/go_modules/_examples/simplechat/go-modules-updates-aed0a436bf
  • dependabot/go_modules/_examples/simplechat/go-modules-updates-b841ea8733
  • dependabot/go_modules/_examples/simplechat/go-modules-updates-d503fb43d4
  • dependabot/go_modules/_examples/simplechat/go-modules-updates-dd111468ba
  • dependabot/go_modules/_examples/simplechat/go-modules-updates-e06798f191
  • dependabot/go_modules/_examples/simplechat/modernc.org/sqlite-1.37.0
  • dependabot/go_modules/github.com/go-pkgz/testutils-0.4.2
  • dependabot/go_modules/go-modules-updates-589f0c7bc4
  • dependabot/go_modules/go-modules-updates-75e783174d
  • dependabot/go_modules/go-modules-updates-796ea05e18
  • dependabot/go_modules/go-modules-updates-94abde7b92
  • dependabot/go_modules/go-modules-updates-db89e520f1
  • dependabot/go_modules/go_modules-232a611e2d
  • dependabot/go_modules/go_modules-57bd245098
  • dependabot/go_modules/go_modules-5a9c29dde4
  • dependabot/go_modules/go_modules-9c5197dcb8
  • dependabot/go_modules/go_modules-acb2299ea6
  • dependabot/go_modules/go_modules-c8c7c79cc3
  • dependabot/go_modules/go_modules-dd7da38a6b
  • detect-story
  • detector-persist
  • docs/stale-defaults
  • download-spam-button
  • drop-chi
  • dyn-update
  • easy-install-docs
  • eliminate-obsolete-flag
  • emoji-optimization
  • empty-text-locator
  • exact-match-stopwords
  • extra-delete-ids
  • extract-lib
  • faster-removal
  • feat/csrf-protection
  • feat/decouple-image-text-len
  • feat/dictionary-management-ui
  • feat/e2e-ui-tests
  • feat/external-reply-meta
  • feat/handle-edited-messages
  • feat/meta-contact-only-354
  • feat/meta-mention-only-check
  • feat/sqlite-to-postgres-converter
  • feature-297-openai-thinking
  • feature-custom-prompts
  • feature-db-configuration
  • feature-lua-plugins
  • feature/add-spam-filter
  • feature/aggressive-cleanup
  • feature/auto-ban-threshold
  • feature/bot-no-sound
  • feature/delete-system-messages
  • feature/digitalocean-deployment
  • feature/duplicate-detection
  • feature/duplicate-detection-aggressive-cleanup
  • feature/info-on-unban
  • feature/issue92
  • feature/keyboard-detection
  • feature/max-short-msg-count-399
  • feature/mentions-limit
  • feature/openai-check-short-messages
  • feature/prohibited-langs
  • feature/report-enhancements
  • feature/resend-orig-msg
  • feature/richmsg-detection
  • feature/silent-messages
  • feature/user-spam-reporting
  • feature/username-symbols-check
  • feature/username-userid-stopwords
  • fix-174
  • fix-183
  • fix-295-giveaway-forwards
  • fix-304-reasoning-effort
  • fix-admin-error-propagation
  • fix-ci-caching
  • fix-ci-disk-space
  • fix-firstmgs-count
  • fix-forward-detection
  • fix-gpt5-max-tokens-support
  • fix-info-button-markdown-escaping
  • fix-issue-223
  • fix-openai-short-msg-veto-335
  • fix-optional-user-id
  • fix-orphaned-report-deletion-343
  • fix-samples-migration
  • fix-settings-formatting
  • fix-spam-command-quote-handling
  • fix-stopword-space-normalization
  • fix-video-listener-event
  • fix/381-auth-hash
  • fix/anonymous-admin-posts-skip-spam-check
  • fix/caption-link-entities
  • fix/channel-ban-370
  • fix/check-quoted-text-for-spam
  • fix/confdb-reload-and-merge-artefacts
  • fix/convert-missing-tables
  • fix/detected-spam-index
  • fix/dictionary-import-and-forum-reports
  • fix/docker-preset-perms
  • fix/duplicate-detection-message-edits
  • fix/history-last-n
  • fix/image-caption-mentions
  • fix/image-only-spam-reporting
  • fix/issue-348-validate-bot-username
  • fix/issue107
  • fix/listener-nil-from
  • fix/locator-gid-pk
  • fix/media-short-text-detection
  • fix/reaction-ban-buttons
  • fix/report-handling
  • fix/rest-writeheader-renderjson
  • fix/review-findings
  • fix/short-message-approval
  • fix/webapi-pin-cdn-sri
  • forward-check
  • hashed-web-passwd
  • ignore-classifier
  • imporve-hist-openai
  • improved-settings-page
  • letterlikе
  • lib-example
  • linked-channel-admin
  • links-only
  • linter-v2-migration
  • loading-indicator-delete
  • meta-checks
  • min-spam-probability
  • more-commands
  • more-ui
  • multi-first
  • multi-lang
  • multi-storage
  • negative-time
  • no-giveaway
  • normalize-spam-text
  • opeani-ignore
  • open-ai
  • openai-apibase
  • openai-veto
  • optimize-exclude-match
  • optimize-sample-loader
  • paskal/bump_modules
  • paskal/claude
  • paskal/dependabot-disable-updates
  • paskal/dependabot-security-updates
  • paskal/dockerfile_comment
  • paskal/fix_ci
  • paskal/fix_golangci_lint
  • paskal/fix_typos
  • paskal/go-flags
  • paskal/openai_doc
  • paskal/remove-unused-code
  • paskal/remove_unused_moq
  • paskal/small-fixes
  • paskal/switch_to_newer_tb_lib
  • paskal/test_examples
  • paskal/update_doc_and_readme
  • paskal/update_modules
  • paskal/use_ghcrio
  • patch-1
  • perf/listener-extra-deletes
  • perf/listener-idle-timer
  • perf/multilang-scan
  • perf/openai-tokenizer
  • persistent-locator
  • persitent-ids
  • pic-caption
  • reaction-spam-detection
  • refactor-admin
  • refs/tags/v0.1.0
  • refs/tags/v0.1.1
  • refs/tags/v0.2.0
  • refs/tags/v0.2.1
  • refs/tags/v0.2.2
  • refs/tags/v0.2.3
  • refs/tags/v0.2.4
  • refs/tags/v1.0.0
  • refs/tags/v1.0.1
  • refs/tags/v1.1.0
  • refs/tags/v1.1.2
  • refs/tags/v1.10.0
  • refs/tags/v1.10.1
  • refs/tags/v1.10.2
  • refs/tags/v1.10.3
  • refs/tags/v1.11.0
  • refs/tags/v1.11.1
  • refs/tags/v1.11.2
  • refs/tags/v1.11.3
  • refs/tags/v1.11.4
  • refs/tags/v1.11.5
  • refs/tags/v1.11.6
  • refs/tags/v1.12.0
  • refs/tags/v1.12.1
  • refs/tags/v1.12.2
  • refs/tags/v1.13.0
  • refs/tags/v1.13.1
  • refs/tags/v1.13.2
  • refs/tags/v1.13.3
  • refs/tags/v1.13.4
  • refs/tags/v1.13.5
  • refs/tags/v1.13.6
  • refs/tags/v1.14.0
  • refs/tags/v1.14.1
  • refs/tags/v1.14.2
  • refs/tags/v1.14.3
  • refs/tags/v1.15.0
  • refs/tags/v1.16.0
  • refs/tags/v1.16.1
  • refs/tags/v1.16.2
  • refs/tags/v1.16.3
  • refs/tags/v1.17.0
  • refs/tags/v1.18.0
  • refs/tags/v1.18.1
  • refs/tags/v1.19.0
  • refs/tags/v1.19.2
  • refs/tags/v1.2.0
  • refs/tags/v1.2.1
  • refs/tags/v1.2.2
  • refs/tags/v1.2.3
  • refs/tags/v1.2.4
  • refs/tags/v1.2.5
  • refs/tags/v1.20.0
  • refs/tags/v1.20.1
  • refs/tags/v1.21.0
  • refs/tags/v1.22.0
  • refs/tags/v1.23.0
  • refs/tags/v1.23.1
  • refs/tags/v1.23.2
  • refs/tags/v1.23.3
  • refs/tags/v1.23.4
  • refs/tags/v1.23.5
  • refs/tags/v1.23.6
  • refs/tags/v1.23.7
  • refs/tags/v1.24.0
  • refs/tags/v1.25.0
  • refs/tags/v1.26.0
  • refs/tags/v1.3.0
  • refs/tags/v1.3.1
  • refs/tags/v1.4.0
  • refs/tags/v1.4.1
  • refs/tags/v1.4.2
  • refs/tags/v1.5.0
  • refs/tags/v1.5.1
  • refs/tags/v1.5.2
  • refs/tags/v1.5.3
  • refs/tags/v1.6.0
  • refs/tags/v1.6.1
  • refs/tags/v1.7.0
  • refs/tags/v1.8.0
  • refs/tags/v1.8.1
  • refs/tags/v1.8.2
  • refs/tags/v1.8.3
  • refs/tags/v1.9.0
  • remove-from-aproved
  • reply-ban
  • req-history
  • restore-configurable-auth-user
  • retry-openai
  • retry-plain
  • rt-aproved-save
  • settings-ui
  • small-screen-styles
  • soft-ban
  • softmax_float64_underflow
  • spam-storage
  • sqlite-all
  • supers-by-id
  • test/proc-user-reply
  • training-ban
  • training-mode
  • unban-confirm
  • universal-multilang
  • update-go-1.25
  • v1.4.2
  • video-check
  • volume-warns
  • warn-auto-ban
  • web-checker
  • webapi
  • worktree-recent-bot-users
  • would

17 Jul 2026 08:33PM UTC coverage: 83.742% (+0.02%) from 83.723%
29611674358

push

github

web-flow
feat: add optional --meta.image-text-len for image-only check (#430)

the image-only meta check reused `--min-msg-len` as its caption-length threshold, coupling two unrelated knobs. A short caption exactly at the `--min-msg-len` boundary slips through, because the check compares with strict `<`. Seen in production: an image ad with a 15-rune caption against `MIN_MSG_LEN=15` passed every content check, since the spam pitch was baked into the image pixels and only the short caption is visible to the classifier and LLM.

this adds `--meta.image-text-len` / `META_IMAGE_TEXT_LEN` (config `Meta.ImageTextLen`) to set a separate minimum caption length for image messages. `0` (the default) falls back to `--min-msg-len`, so existing behavior is unchanged unless you set it.

wired through every config layer: CLI/env, the CLI-to-Settings mapping, DB-backed config (with a `zeroAwarePaths` entry so an explicit `0` survives merges), and the web settings UI (form input plus read-only row, `min="0"` and a `Validate` bound that rejects negatives). Covered by unit tests for the mapping, the web form parse, and the `makeDetector` override-vs-fallback selection, plus an e2e UI round-trip, and documented in both README sections.

13 of 15 new or added lines in 4 files covered. (86.67%)

1 existing line in 1 file now uncovered.

8921 of 10653 relevant lines covered (83.74%)

254.44 hits per line

Relevant lines Covered
Build:
Build:
10653 RELEVANT LINES 8921 COVERED LINES
254.44 HITS PER LINE
Source Files on master
  • Tree
  • List 42
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
29611674358 master feat: add optional --meta.image-text-len for image-only check (#430) the image-only meta check reused `--min-msg-len` as its caption-length threshold, coupling two unrelated knobs. A short caption exactly at the `--min-msg-len` boundary slips thr... push 17 Jul 2026 08:38PM UTC web-flow github
83.74
29400565840 master 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 ... push 15 Jul 2026 08:26AM UTC web-flow github
83.72
29372019250 master feat: detect spam in rich messages (telegram articles) (#428) flatten telegram rich_message (bot api 10.2 article compose type) into message.Text in transform() so previously-invisible article spam runs through the existing detection pipeline. bu... push 14 Jul 2026 10:12PM UTC web-flow github
83.7
29366044979 master chore(deps): update telegram-bot-api to bot api 10.2 bump github.com/OvyFlash/telegram-bot-api to the 10.2 release which adds rich_message (article) support. adjust call sites and test fixtures for the int->int64 widening of message time fields (... push 14 Jul 2026 08:36PM UTC umputun github
83.63
29293948129 master feat: prohibited languages spam detector (#427) Add a spam detector that blocks messages written in prohibited Unicode scripts. Configure a blocklist of scripts (chinese=Han, russian=Cyrillic, etc.); a message with enough letters of a banned scri... push 13 Jul 2026 11:48PM UTC web-flow github
83.63
29142208803 master ci: only publish updater images from master and tags The build job ran its registry logins and image pushes on every non-PR push, including feature branches. Those steps authenticate with github.actor, which is only the image owner on the release... push 11 Jul 2026 06:07AM UTC umputun github
83.43
29141763371 master fix(ci): move to playwright-go v0.6100.0 to unbreak e2e-ui driver download playwright-go up to v0.6000.0 fetches its driver zip from three hardcoded *.azureedge.net mirrors. Microsoft retired that CDN, so playwright-1.52.0-linux.zip now 404s and ... push 11 Jul 2026 05:51AM UTC umputun github
83.42
28850817269 master ci: use explicit ["**"] branches/tags in build-app push trigger #412 removed the empty branches:/tags: keys from ci.yml while fixing the paths_ignored typo. Those keys are intentional: GitHub scopes push events by ref type, so defining one key bu... push 07 Jul 2026 08:00AM UTC umputun github
83.43
28850477820 master fix: scope locator primary keys by gid to prevent cross-group clobbering messages.hash and spam.user_id were single-column primary keys while the upserts overwrite gid on conflict, so two instances with different --instance-id sharing one databas... push 07 Jul 2026 07:53AM UTC umputun github
83.46
28848461549 master feat: add mention-only meta check (#424) new spam pattern showed up: a message that is just a mention and a number, like `@blah 3`. There was no "mention-only" check before (only a mention *count* check and a link-only check), so this adds one. ... push 07 Jul 2026 07:15AM UTC web-flow github
83.55
See All Builds (1436)
  • Repo on GitHub
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