Sfoglia il codice sorgente

try to reply a link see if it auto convert. answer is ..no.

master
Patrick Peng Sun 8 anni fa
parent
commit
9452f42584
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. +3
    -0
      server.go

+ 3
- 0
server.go Vedi File

@@ -59,6 +59,9 @@ func answerWechatPost(w http.ResponseWriter, r *http.Request) {
fmt.Printf("decrypt as: %s\n", d)
h := ReadCommonHeader(d)
reply, _ := BuildTextMsg(h.MsgType, h.FromUserName)
if h.MsgType == "text" {
reply, _ = BuildTextMsg("http://www.hitxy.org.au/", h.FromUserName)
}
if h.MsgType == "voice" {
a := ReadVoiceMsg(d)
reply, _ = BuildTextMsg(a.Recognition, h.FromUserName)

Loading…
Annulla
Salva