mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-15 22:39:03 +08:00
error
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"OpenIM/pkg/common/config"
|
||||
"OpenIM/pkg/common/constant"
|
||||
discoveryRegistry "OpenIM/pkg/discoveryregistry"
|
||||
"OpenIM/pkg/errs"
|
||||
"OpenIM/pkg/proto/friend"
|
||||
sdkws "OpenIM/pkg/proto/sdkws"
|
||||
"context"
|
||||
@@ -67,7 +68,7 @@ func (f *FriendChecker) GetAllPageFriends(ctx context.Context, ownerUserID strin
|
||||
if tmp.Total == int32(len(resp)) {
|
||||
return resp, nil
|
||||
}
|
||||
return nil, constant.ErrData.Wrap("The total number of results and expectations are different, but result is nil")
|
||||
return nil, errs.ErrData.Wrap("The total number of results and expectations are different, but result is nil")
|
||||
}
|
||||
resp = append(resp, tmp.FriendsInfo...)
|
||||
page++
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"OpenIM/pkg/common/config"
|
||||
"OpenIM/pkg/common/constant"
|
||||
discoveryRegistry "OpenIM/pkg/discoveryregistry"
|
||||
"OpenIM/pkg/errs"
|
||||
"OpenIM/pkg/proto/group"
|
||||
sdkws "OpenIM/pkg/proto/sdkws"
|
||||
"OpenIM/pkg/utils"
|
||||
@@ -41,7 +42,7 @@ func (g *GroupChecker) GetGroupInfos(ctx context.Context, groupIDs []string, com
|
||||
if ids := utils.Single(groupIDs, utils.Slice(resp.GroupInfos, func(e *sdkws.GroupInfo) string {
|
||||
return e.GroupID
|
||||
})); len(ids) > 0 {
|
||||
return nil, constant.ErrGroupIDNotFound.Wrap(strings.Join(ids, ","))
|
||||
return nil, errs.ErrGroupIDNotFound.Wrap(strings.Join(ids, ","))
|
||||
}
|
||||
}
|
||||
return resp.GroupInfos, nil
|
||||
@@ -81,7 +82,7 @@ func (g *GroupChecker) GetGroupMemberInfos(ctx context.Context, groupID string,
|
||||
if ids := utils.Single(userIDs, utils.Slice(resp.Members, func(e *sdkws.GroupMemberFullInfo) string {
|
||||
return e.UserID
|
||||
})); len(ids) > 0 {
|
||||
return nil, constant.ErrNotInGroupYet.Wrap(strings.Join(ids, ","))
|
||||
return nil, errs.ErrNotInGroupYet.Wrap(strings.Join(ids, ","))
|
||||
}
|
||||
}
|
||||
return resp.Members, nil
|
||||
|
||||
@@ -2,8 +2,8 @@ package check
|
||||
|
||||
import (
|
||||
"OpenIM/pkg/common/config"
|
||||
"OpenIM/pkg/common/constant"
|
||||
"OpenIM/pkg/discoveryregistry"
|
||||
"OpenIM/pkg/errs"
|
||||
"OpenIM/pkg/proto/sdkws"
|
||||
"OpenIM/pkg/proto/user"
|
||||
"OpenIM/pkg/utils"
|
||||
@@ -41,7 +41,7 @@ func (u *UserCheck) GetUsersInfos(ctx context.Context, userIDs []string, complet
|
||||
if ids := utils.Single(userIDs, utils.Slice(resp.UsersInfo, func(e *sdkws.UserInfo) string {
|
||||
return e.UserID
|
||||
})); len(ids) > 0 {
|
||||
return nil, constant.ErrUserIDNotFound.Wrap(strings.Join(ids, ","))
|
||||
return nil, errs.ErrUserIDNotFound.Wrap(strings.Join(ids, ","))
|
||||
}
|
||||
}
|
||||
return resp.UsersInfo, nil
|
||||
|
||||
Reference in New Issue
Block a user