replace invalid utf8 chars in text messages
This commit is contained in:
@@ -17,6 +17,7 @@ import (
|
||||
log "github.com/sirupsen/logrus"
|
||||
"io"
|
||||
"net/http"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -563,7 +564,7 @@ workloop:
|
||||
var bulk []*ent.MessagesCreate
|
||||
for _, msg := range tMatchPlayer.Edges.Messages {
|
||||
bulk = append(bulk, tx.Messages.Create().
|
||||
SetMessage(msg.Message).
|
||||
SetMessage(strings.ToValidUTF8(msg.Message, "")).
|
||||
SetAllChat(msg.AllChat).
|
||||
SetTick(msg.Tick).
|
||||
SetMatchPlayer(tMatchPlayer))
|
||||
|
Reference in New Issue
Block a user