2018-09-13 10:18:59 +00:00
|
|
|
package linemsg
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
lineobj "git.trj.tw/golang/mtfosbot/module/line-message/line-object"
|
|
|
|
)
|
|
|
|
|
|
|
|
// MessageEvent -
|
2019-06-25 09:02:03 +00:00
|
|
|
func MessageEvent(botid string, e *lineobj.EventObject) {
|
|
|
|
if len(botid) == 0 {
|
|
|
|
return
|
|
|
|
}
|
2018-09-13 10:18:59 +00:00
|
|
|
switch e.Type {
|
|
|
|
case "message":
|
2019-06-25 09:02:03 +00:00
|
|
|
messageType(botid, e)
|
2018-09-13 10:18:59 +00:00
|
|
|
break
|
2018-09-20 17:14:08 +00:00
|
|
|
default:
|
|
|
|
fmt.Println("line webhook type not match")
|
2018-09-13 10:18:59 +00:00
|
|
|
}
|
|
|
|
}
|