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)) + } } + }