websotckt

This commit is contained in:
苏尹岚
2020-11-11 14:20:23 +08:00
parent ff16d1db79
commit 2887294071

View File

@@ -94,6 +94,9 @@ func (c *EventController) TestWebsocket() {
)
//将当前客户端放入map中
messageGroups, _ := dao.GetUserMessageGroups(dao.GetDB(), userID)
if len(messageGroups) == 0 {
return
}
for _, v := range messageGroups {
clients[v.GroupID] = append(clients[v.GroupID], ws)
}