| h := ReadCommonHeader(d) | h := ReadCommonHeader(d) | ||||
| reply, _ := BuildTextMsg(h.MsgType, h.FromUserName) | reply, _ := BuildTextMsg(h.MsgType, h.FromUserName) | ||||
| if h.MsgType == "text" { | if h.MsgType == "text" { | ||||
| reply, _ = BuildTextMsg("test <a href=http://www.hitxy.org.au/> some link </a>", h.FromUserName) | |||||
| // url := "http://www.google.com.au/" | |||||
| // first := "很高兴有你参加志愿者" | |||||
| // remark := "明天给你发1万块钱" | |||||
| // name := "利于修" | |||||
| // staffID := "1235465" | |||||
| // joinDate := time.Now().Format("2006-01-02 15:04:06 Mon MST -07") | |||||
| // totalCount := "50次" | |||||
| // totalTime := "2小时" | |||||
| // log.Println("send kf msg") | |||||
| // templateSendJoinVolunteer(h.FromUserName, url, first, remark, name, staffID, joinDate, totalCount, totalTime) | |||||
| reply, _ = BuildKFTransferAnyOneMsg(h.FromUserName) | |||||
| //reply, _ = BuildKFTransferMsg(h.FromUserName, "kf2001@gh_f09231355c68") | |||||
| //reply, _ = BuildTextMsg("test <a href=http://www.hitxy.org.au/> some link </a>", h.FromUserName) | |||||
| } | } | ||||
| if h.MsgType == "voice" { | if h.MsgType == "voice" { | ||||
| a := ReadVoiceMsg(d) | a := ReadVoiceMsg(d) | ||||
| if h.MsgType == "event" { | if h.MsgType == "event" { | ||||
| a := ReadEventMsg(d) | a := ReadEventMsg(d) | ||||
| if a.Event == "LOCATION" { | if a.Event == "LOCATION" { | ||||
| reply = BuildLocationMsg(0, 0, 0, h.FromUserName) | |||||
| reply, _ = BuildTextMsg("test <a href=http://www.hitxy.org.au/> some link </a>", h.FromUserName) | |||||
| fmt.Printf("output %s", reply) | fmt.Printf("output %s", reply) | ||||
| } else { | } else { | ||||
| reply, _ = BuildTextMsg(a.Event+"/"+a.EventKey, h.FromUserName) | reply, _ = BuildTextMsg(a.Event+"/"+a.EventKey, h.FromUserName) |