package main

func (ss *openIDSessionData) serveEvents(in InWechatMsg) (processed bool) {
	processed = false
	e := in.body.(EventMsg)
	switch e.Event {
	case "subscribe":
		in.replyText("/::D, 来啦")
		processed = true
		onSubscribe(in)
		return
	case "unsubscribe":
		processed = true
		in.replyText("")
		return
	case "SCAN":
	case "LOCATION":
		processed = true
		in.replyText("LOCATION")
	case "CLICK":
	case "VIEW":
	case "TEMPLATESENDJOBFINISH":
		processed = true
		in.replyText("TEMPLATESENDJOBFINISH")
	}
	return
}
