Merge branch 'refs/heads/feature-im'

This commit is contained in:
junleea 2024-08-07 15:04:04 +08:00
commit 3fbf6bbc25
1 changed files with 2 additions and 2 deletions

View File

@ -34,8 +34,8 @@ func CreateGeneralMessageService(from_id, to_id, msg_type int, content string) (
case 4: case 4:
res, _ := dao.GetMsgUserByIndex(from_id, to_id, 4, 1, 0) res, _ := dao.GetMsgUserByIndex(from_id, to_id, 4, 1, 0)
if len(res) > 0 { if len(res) > 0 {
// 已经有会话记录 // 已经有会话记录,返回会话id
return errors.New("already have a conversation"), 0 return nil, res[0].ID
} }
err, id = dao.CreateGeneralMessage(from_id, to_id, msg_type, 0, 0, content) err, id = dao.CreateGeneralMessage(from_id, to_id, msg_type, 0, 0, content)
case 5: case 5: