add pre group one bot setting
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user