Compare commits

..

No commits in common. "4bf18347ceebeecd8b9a7dc73340648c1484b0b7" and "44e2240637481532b263f144f1472a16a44d9a04" have entirely different histories.

2 changed files with 1 additions and 7 deletions

View File

@ -274,6 +274,6 @@ func FindGroupUsers(group_id int) []GroupUser {
func FindGroupByNameLike(groupName string) []Group {
var groups []Group
DB.Debug().Where("group_name like ?", "%"+groupName+"%").Limit(20).Find(&groups)
DB.Debug().Where("group_name like ?", "%"+groupName+"%").Find(&groups)
return groups
}

View File

@ -66,12 +66,6 @@ func CreateGeneralMessageService(from_id, to_id, msg_type, group_id int, content
err, id = dao.CreateGeneralMessage(from_id, to_id, msg_type, 0, group_id, content)
case proto.MSG_TYPE_GROUP_ADD:
//加入群聊请求
//判断是否在群里
groupUser := dao.FindGroupUser(from_id, group_id)
if len(groupUser) > 0 {
return errors.New("已在群里"), 0
}
err, id = dao.CreateGeneralMessage(from_id, to_id, msg_type, 0, group_id, content)
case proto.MSG_TYPE_GROUP_INVI:
//邀请加群,直接加入