Don't contact google to translate empty messages.

This commit is contained in:
Patrick Connolly
2018-10-15 08:35:34 +08:00
parent 03e2b90a24
commit ea89e62a96

View File

@@ -332,7 +332,7 @@ 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 = ""
if (gw.Router.GTClient != nil) && (channel.Options.Locale != "") {
if (gw.Router.GTClient != nil) && (channel.Options.Locale != "") && (origmsg.Text != "") {
ctx := context.Background()