mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-15 22:39:03 +08:00
modify dic
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/convert"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
|
||||
@@ -51,7 +52,7 @@ func (s *groupServer) GetJoinedSuperGroupList(ctx context.Context, req *pbGroup.
|
||||
return e.GroupID, e.MemberIDs
|
||||
})
|
||||
resp.Groups = utils.Slice(groupIDs, func(groupID string) *sdkws.GroupInfo {
|
||||
return DbToPbGroupInfo(groupMap[groupID], ownerMap[groupID].UserID, uint32(len(superGroupMemberMap)))
|
||||
return convert.Db2PbGroupInfo(groupMap[groupID], ownerMap[groupID].UserID, uint32(len(superGroupMemberMap)))
|
||||
})
|
||||
return resp, nil
|
||||
}
|
||||
@@ -80,7 +81,7 @@ func (s *groupServer) GetSuperGroupsInfo(ctx context.Context, req *pbGroup.GetSu
|
||||
return e.GroupID
|
||||
})
|
||||
resp.GroupInfos = utils.Slice(groups, func(e *relation.GroupModel) *sdkws.GroupInfo {
|
||||
return DbToPbGroupInfo(e, ownerMap[e.GroupID].UserID, uint32(len(superGroupMemberMap[e.GroupID])))
|
||||
return convert.Db2PbGroupInfo(e, ownerMap[e.GroupID].UserID, uint32(len(superGroupMemberMap[e.GroupID])))
|
||||
})
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user