From 1d3987078b20ff7a825bee3ff907c71fe23a8b5d Mon Sep 17 00:00:00 2001 From: cdle <798731886@qq.com> Date: Mon, 20 Sep 2021 11:08:31 +0800 Subject: [PATCH] update --- core/push.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/core/push.go b/core/push.go index 978547f..d5b3ec9 100644 --- a/core/push.go +++ b/core/push.go @@ -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) + } } } }