| package main | |||||
| import "time" | |||||
| func (ss *openIDSessionData) serveEvents(in InWechatMsg) (processed bool) { | |||||
| processed = false | |||||
| e := in.body.(EventMsg) | |||||
| switch e.Event { | |||||
| case "subscribe": | |||||
| in.replyText("/::D, 来啦") | |||||
| first := "欢迎加入海外学子之家,这里凝聚着哈工大人在澳洲的,勤奋,努力和奋斗" | |||||
| url := "http://wechat.hitxy.org.au/profile_newly_register" | |||||
| remark := "如果您是首次加入本社区,请点击详情完善您的个人资料" | |||||
| communityName := "哈工大澳洲校友会" | |||||
| joinDate := time.Now().Format("2006-Jan-02") | |||||
| templateSendJoinCommunity(in.header.FromUserName, url, first, remark, communityName, joinDate) | |||||
| processed = true | |||||
| return | |||||
| case "unsubscribe": | |||||
| case "SCAN": | |||||
| case "LOCATION": | |||||
| processed = true | |||||
| in.replyText("LOCATION") | |||||
| case "CLICK": | |||||
| case "VIEW": | |||||
| case "TEMPLATESENDJOBFINISH": | |||||
| processed = true | |||||
| in.replyText("TEMPLATESENDJOBFINISH") | |||||
| } | |||||
| return | |||||
| } |