Fixed poor trimming of translation source text.

This commit is contained in:
Patrick Connolly
2018-10-20 19:48:36 +08:00
parent 311ac5a099
commit 3b0a91d3ee
2 changed files with 7 additions and 1 deletions

View File

@@ -332,7 +332,9 @@ func (gw *Gateway) handleMessage(msg config.Message, dest *bridge.Bridge) []*BrM
msg.Avatar = gw.modifyAvatar(origmsg, dest)
msg.Username = gw.modifyUsername(origmsg, dest)
msg.ID = ""
// Don't keep artifacts in between processed translations
msg.Text = origmsg.Text
msg.TranslationSrcMsg = nil
// Translation
if (gw.Router.GTClient != nil) && (channel.Options.Locale != "") && (msg.Text != "") {