From b0f2d7fc3c184431f2bf1eab81c8b93eaefd16a3 Mon Sep 17 00:00:00 2001 From: Patrick Peng Sun Date: Thu, 13 Jul 2017 19:23:07 +1000 Subject: [PATCH] safe guard empty message will not produce "BUG" message, it's legit --- wechatMsg.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wechatMsg.go b/wechatMsg.go index ab52150..7f17bd9 100644 --- a/wechatMsg.go +++ b/wechatMsg.go @@ -35,6 +35,9 @@ func (m *InWechatMsg) replyXML(xml string) { } func (m *InWechatMsg) replyText(s string) { + if s == "" && m.replied == true { + return //skip safeguard empty message + } str, _ := BuildTextMsg(m.header.FromUserName, s) m.replyXML(str) }