创建聊天组

This commit is contained in:
苏尹岚
2020-10-21 11:43:15 +08:00
parent 9b8fc7e1dc
commit 9861f7a774
2 changed files with 43 additions and 0 deletions

View File

@@ -132,6 +132,10 @@ func CreateMessageGroup(ctx *jxcontext.Context, userID, userID2 string) (err err
groupID int
)
if userID2 != "" {
messageGroups, err := dao.GetMessageGroups(db, userID, model.GroupMemberTypeNormal, userID2)
if len(messageGroups) > 0 && messageGroups[0].MessageGroupMembers != nil {
return err
}
user, err := dao.GetUserByID(db, "user_id", userID2)
if err != nil {
return err