mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-24 02:16:16 +08:00
group
This commit is contained in:
parent
2152f5d45d
commit
c2f4550166
@ -632,6 +632,12 @@ func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq)
|
|||||||
if group.Status == constant.GroupStatusDismissed {
|
if group.Status == constant.GroupStatusDismissed {
|
||||||
return nil, errs.ErrDismissedAlready.Wrap()
|
return nil, errs.ErrDismissedAlready.Wrap()
|
||||||
}
|
}
|
||||||
|
_, err = s.GroupDatabase.TakeGroupMember(ctx, req.GroupID, mcontext.GetOpUserID(ctx))
|
||||||
|
if err == nil {
|
||||||
|
return nil, errs.ErrArgs.Wrap("already in group")
|
||||||
|
} else if !s.IsNotFound(err) {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
if group.NeedVerification == constant.Directly {
|
if group.NeedVerification == constant.Directly {
|
||||||
if group.GroupType == constant.SuperGroup {
|
if group.GroupType == constant.SuperGroup {
|
||||||
return nil, errs.ErrGroupTypeNotSupport.Wrap()
|
return nil, errs.ErrGroupTypeNotSupport.Wrap()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user