This commit is contained in:
cdle
2021-09-17 10:24:37 +08:00
parent 22783733c7
commit b793ce4695
+7 -3
View File
@@ -15,8 +15,12 @@ type Chat struct {
UserID int UserID int
} }
func (ct *Chat) Push(content string) { func (ct *Chat) Push(content interface{}) {
if push, ok := GroupPushs[ct.Class]; ok { switch content.(type) {
push(ct.ID, ct.UserID, content) case string:
if push, ok := GroupPushs[ct.Class]; ok {
push(ct.ID, ct.UserID, content.(string))
}
} }
} }