|
|
|
@@ -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: |