add pre group one bot setting
This commit is contained in:
1 parent
c605b2d9e9
commit
8c432b9b68
13 files changed
+185
-56
No files matched your search
@@ -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