stats: Add trimset
This commit is contained in:
parent
6ad3dd7ce0
commit
dfe2857ae7
1 changed files with 1 additions and 0 deletions
|
@ -318,6 +318,7 @@ func processWords(message tg.APIMessage) {
|
||||||
err := db.Update(func(tx *bolt.Tx) error {
|
err := db.Update(func(tx *bolt.Tx) error {
|
||||||
b := tx.Bucket([]byte("words"))
|
b := tx.Bucket([]byte("words"))
|
||||||
for _, word := range wordList {
|
for _, word := range wordList {
|
||||||
|
word = strings.Trim(word, " ?!.,:;/-_()[]{}'\"+=*^\n")
|
||||||
count, ok := words[word]
|
count, ok := words[word]
|
||||||
if !ok {
|
if !ok {
|
||||||
count = make(UserCount)
|
count = make(UserCount)
|
||||||
|
|
Reference in a new issue