mtfosbot/module/line-message/message-event.go
2019-06-25 20:56:52 +08:00

24 lines
398 B
Go

package linemsg
import (
"fmt"
"log"
lineobj "git.trj.tw/golang/mtfosbot/module/line-message/line-object"
)
// MessageEvent -
func MessageEvent(botid string, e *lineobj.EventObject) {
log.Println("proc message evt :: ", botid, *e)
if len(botid) == 0 {
return
}
switch e.Type {
case "message":
messageType(botid, e)
break
default:
fmt.Println("line webhook type not match")
}
}