test-errcode
withchao 2 years ago
parent ea299b73aa
commit 72e6f8bc99

@ -634,7 +634,6 @@ func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq)
return nil, errs.ErrDismissedAlready.Wrap()
}
_, err = s.GroupDatabase.TakeGroupMember(ctx, req.GroupID, req.InviterUserID)
log.ZInfo(ctx, "Test-Info", "error", err, "type", fmt.Sprintf("%T", err), "eq", s.IsNotFound(err))
if err == nil {
return nil, errs.ErrArgs.Wrap("already in group")
} else if !s.IsNotFound(err) {

@ -276,7 +276,7 @@ func (g *groupDatabase) DeleteGroupMember(ctx context.Context, groupID string, u
if err := g.groupMemberDB.NewTx(tx).Delete(ctx, groupID, userIDs); err != nil {
return err
}
return g.cache.DelGroupMembersHash(groupID).DelGroupMemberIDs(groupID).DelGroupsMemberNum(groupID).DelJoinedGroupID(userIDs...).ExecDel(ctx)
return g.cache.DelGroupMembersHash(groupID).DelGroupMemberIDs(groupID).DelGroupsMemberNum(groupID).DelJoinedGroupID(userIDs...).DelGroupMembersInfo(groupID, userIDs...).ExecDel(ctx)
})
}

Loading…
Cancel
Save