fix send message return
This commit is contained in:
parent
84f2dcaed5
commit
63dee0c857
|
|
@ -34,8 +34,8 @@ func CreateGeneralMessageService(from_id, to_id, msg_type int, content string) (
|
|||
case 4:
|
||||
res, _ := dao.GetMsgUserByIndex(from_id, to_id, 4, 1, 0)
|
||||
if len(res) > 0 {
|
||||
// 已经有会话记录
|
||||
return errors.New("already have a conversation"), 0
|
||||
// 已经有会话记录,返回会话id
|
||||
return nil, res[0].ID
|
||||
}
|
||||
err, id = dao.CreateGeneralMessage(from_id, to_id, msg_type, 0, 0, content)
|
||||
case 5:
|
||||
|
|
|
|||
Loading…
Reference in New Issue