diff --git a/sample_data/kf_event.txt b/sample_data/kf_event.txt new file mode 100644 index 0000000..420026b --- /dev/null +++ b/sample_data/kf_event.txt @@ -0,0 +1,17 @@ + + +1495907032 + + + + + + + + +1495907067 + + + + + \ No newline at end of file diff --git a/serveCommand.go b/serveCommand.go index f8df67c..c7fac03 100644 --- a/serveCommand.go +++ b/serveCommand.go @@ -19,6 +19,7 @@ func echoCommand(openID string, in InWechatMsg) (state chatState, processed bool case TextMsg: m := in.body.(TextMsg) str, err = BuildTextMsg(openID, m.Content) + processed = false case PicMsg: m := in.body.(PicMsg) str = buildPicMsg(openID, m.MediaId) @@ -37,9 +38,8 @@ func echoCommand(openID string, in InWechatMsg) (state chatState, processed bool m := in.body.(LocationMsg) mid := location2MediaID(m.Location_X, m.Location_Y) //str, _ = BuildTextMsg(openID, fmt.Sprintf("long=%f, lat=%f, scale=%d", m.Location_X, m.Location_Y, m.Scale)) - // str = buildPicMsg(openID, mid) + str = buildPicMsg(openID, mid) url := location2URL(m.Location_X, m.Location_Y) - str, _ = BuildTextMsg(openID, mid+"\r\n"+url) kfSendTxt(openID, url) case LinkMsg: