This commit is contained in:
cdle
2021-09-24 07:30:45 +08:00
parent 58b73e2f00
commit a107e0a417
+5 -1
View File
@@ -32,7 +32,11 @@ func (ct *Chat) Push(content interface{}) {
func NotifyMasters(content string) {
for _, class := range []string{"tg", "qq"} {
for _, v := range regexp.MustCompile(`(\d+)`).FindAllStringSubmatch(Bucket(class).Get("masters"), -1) {
notify := Bucket(class).Get("notifiers")
if notify == "" {
notify = Bucket(class).Get("masters")
}
for _, v := range regexp.MustCompile(`(\d+)`).FindAllStringSubmatch(notify, -1) {
if push, ok := Pushs[class]; ok {
push(Int(v[1]), content)
}