mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
group
This commit is contained in:
parent
9910f98d1a
commit
96100501e7
@ -192,9 +192,9 @@ func (g *groupDatabase) FindGroupMember(ctx context.Context, groupIDs []string,
|
||||
}
|
||||
|
||||
func (g *groupDatabase) PageGroupMember(ctx context.Context, groupIDs []string, userIDs []string, roleLevels []int32, pageNumber, showNumber int32) (total uint32, totalGroupMembers []*relationTb.GroupMemberModel, err error) {
|
||||
if roleLevels == nil {
|
||||
if len(roleLevels) == 0 {
|
||||
if pageNumber == 0 || showNumber == 0 {
|
||||
if groupIDs == nil {
|
||||
if len(groupIDs) == 0 {
|
||||
for _, userID := range userIDs {
|
||||
groupIDs, err := g.cache.GetJoinedGroupIDs(ctx, userID)
|
||||
if err != nil {
|
||||
@ -220,7 +220,7 @@ func (g *groupDatabase) PageGroupMember(ctx context.Context, groupIDs []string,
|
||||
}
|
||||
return uint32(len(totalGroupMembers)), totalGroupMembers, nil
|
||||
} else {
|
||||
if groupIDs == nil {
|
||||
if len(groupIDs) == 0 {
|
||||
for _, userID := range userIDs {
|
||||
groupIDs, err := g.cache.GetJoinedGroupIDs(ctx, userID)
|
||||
if err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user