修复了聊天数据异常丢失的bug
This commit is contained in:
+1
-1
@@ -87,7 +87,7 @@ func OpenChat(user models.Users) {
|
||||
return
|
||||
}
|
||||
my := repo.User.GetUserInfo(global.DB)
|
||||
chatItem := models.NewTextChatMsg(my, en.Text)
|
||||
chatItem := models.NewTextChatMsg(my, user.ID, en.Text)
|
||||
userInfo.messages = append(userInfo.messages, *chatItem)
|
||||
_ = repo.ChatMsg.Create(global.DB, chatItem)
|
||||
list.Add(itemMessage(*chatItem))
|
||||
|
||||
Reference in New Issue
Block a user