add pre group one bot setting

This commit is contained in:
Jay
2019-06-25 17:02:03 +08:00
parent c605b2d9e9
commit 8c432b9b68
13 changed files with 185 additions and 56 deletions
+6 -1
View File
@@ -129,6 +129,11 @@ func GetNotifyWebhook(c *context.Context) {
for _, v := range yt.Groups {
log.Println("group data :::: ", v, v.Notify, v.Name, v.ID)
bot, err := v.GetBot()
if err != nil || bot == nil {
log.Println("get group binding bot fail :: ", err)
continue
}
if v.Notify == true {
str := v.Tmpl
log.Println("template :::: ", str)
@@ -144,7 +149,7 @@ func GetNotifyWebhook(c *context.Context) {
}
log.Println("msg ::::: ", msg)
lineapi.PushMessage(v.ID, msg)
lineapi.PushMessage(bot.AccessToken, v.ID, msg)
}
}