fix: 在接收消息时添加对私信类型的处理逻辑,确保消息结构的完整性
This commit is contained in:
parent
a80c530260
commit
d360889729
@ -86,11 +86,13 @@ func (c *WebSocketClient) receiveMessages() {
|
|||||||
GroupId: event.GroupID,
|
GroupId: event.GroupID,
|
||||||
UserCard: event.Sender.Card,
|
UserCard: event.Sender.Card,
|
||||||
}
|
}
|
||||||
} else {
|
} else if event.MessageType == constants.PRIVATE_MSG {
|
||||||
msg.GroupInfo = model.GroupInfo{
|
msg.GroupInfo = model.GroupInfo{
|
||||||
IsGroupMsg: false,
|
IsGroupMsg: false,
|
||||||
GroupId: event.Sender.GroupID,
|
GroupId: event.Sender.GroupID,
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
return
|
||||||
}
|
}
|
||||||
go func() {
|
go func() {
|
||||||
reply := handler.MsgInHandler(msg)
|
reply := handler.MsgInHandler(msg)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user