From 30b9ca42736f9b20eccebf6a8478fba3a840641f Mon Sep 17 00:00:00 2001 From: Umputun Date: Wed, 6 Dec 2023 03:00:03 -0600 Subject: [PATCH] less emoj by default --- app/bot/spam_test.go | 1 + app/main.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/bot/spam_test.go b/app/bot/spam_test.go index 238403ec..d454f1a4 100644 --- a/app/bot/spam_test.go +++ b/app/bot/spam_test.go @@ -41,6 +41,7 @@ func TestFilter_OnMessage(t *testing.T) { Dry: false, HTTPClient: mockedHTTPClient, SpamMsg: "this is spam! go to ban", + MaxAllowedEmoji: 2, }) require.NoError(t, err) diff --git a/app/main.go b/app/main.go index d3bbc7b3..8bef1635 100644 --- a/app/main.go +++ b/app/main.go @@ -52,7 +52,7 @@ var opts struct { SimilarityThreshold float64 `long:"similarity-threshold" env:"SIMILARITY_THRESHOLD" default:"0.5" description:"spam threshold"` MinMsgLen int `long:"min-msg-len" env:"MIN_MSG_LEN" default:"50" description:"min message length to check"` - MaxEmoji int `long:"max-emoji" env:"MAX_EMOJI" default:"5" description:"max emoji count in message"` + MaxEmoji int `long:"max-emoji" env:"MAX_EMOJI" default:"2" description:"max emoji count in message"` ParanoidMode bool `long:"paranoid" env:"PARANOID" description:"paranoid mode, check all messages"` Message struct {