This commit is contained in:
cdle
2021-09-20 11:08:31 +08:00
parent 3fe87e2c59
commit 1d3987078b
+6 -4
View File
@@ -30,10 +30,12 @@ func (ct *Chat) Push(content interface{}) {
}
}
func NotifyMasters(class string, content string) {
for _, v := range regexp.MustCompile(`(\d+)`).FindAllStringSubmatch(Bucket(class).Get("masters"), -1) {
if push, ok := Pushs[class]; ok {
push(Int(v[1]), content)
func NotifyMasters(content string) {
for _, class := range []string{"tg", "qq"} {
for _, v := range regexp.MustCompile(`(\d+)`).FindAllStringSubmatch(Bucket(class).Get("masters"), -1) {
if push, ok := Pushs[class]; ok {
push(Int(v[1]), content)
}
}
}
}