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