From b793ce46955c5978671d79cc2c37075c9eac8d2f Mon Sep 17 00:00:00 2001 From: cdle <798731886@qq.com> Date: Fri, 17 Sep 2021 10:24:37 +0800 Subject: [PATCH] update --- core/push.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/core/push.go b/core/push.go index 0542ef4..924cc49 100644 --- a/core/push.go +++ b/core/push.go @@ -15,8 +15,12 @@ type Chat struct { UserID int } -func (ct *Chat) Push(content string) { - if push, ok := GroupPushs[ct.Class]; ok { - push(ct.ID, ct.UserID, content) +func (ct *Chat) Push(content interface{}) { + switch content.(type) { + case string: + if push, ok := GroupPushs[ct.Class]; ok { + push(ct.ID, ct.UserID, content.(string)) + } } + }