update
This commit is contained in:
+4
-4
@@ -1,7 +1,6 @@
|
||||
package core
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/beego/beego/v2/adapter/httplib"
|
||||
@@ -44,14 +43,15 @@ func NotifyMasters(content string) {
|
||||
if token := sillyGirl.Get("pushplus"); token != "" {
|
||||
httplib.Get("http://www.pushplus.plus/send?token=" + token + "&title=0101010&content=" + content + "&template=html")
|
||||
}
|
||||
for _, class := range []string{"tg", "qq"} {
|
||||
for _, class := range []string{"tg", "qq", "wx"} {
|
||||
notify := Bucket(class).Get("notifiers")
|
||||
if notify == "" {
|
||||
notify = Bucket(class).Get("masters")
|
||||
}
|
||||
for _, v := range regexp.MustCompile(`(\d+)`).FindAllStringSubmatch(notify, -1) {
|
||||
|
||||
for _, v := range strings.Split(notify, "&") {
|
||||
if push, ok := Pushs[class]; ok {
|
||||
push(Int(v[1]), content)
|
||||
push(v[1], content)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user