This commit is contained in:
cdle
2021-09-17 10:24:37 +08:00
parent 22783733c7
commit b793ce4695
+6 -2
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{}) {
switch content.(type) {
case string:
if push, ok := GroupPushs[ct.Class]; ok { if push, ok := GroupPushs[ct.Class]; ok {
push(ct.ID, ct.UserID, content) push(ct.ID, ct.UserID, content.(string))
} }
}
} }