This commit is contained in:
wangchuxiao 2023-03-17 15:48:48 +08:00
parent 19f5354721
commit 04347bcc0d

View File

@ -2,13 +2,14 @@ package convert
import (
"context"
"time"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
discoveryRegistry "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry"
sdk "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws"
"github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient/check"
utils2 "github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
utils "github.com/OpenIMSDK/open_utils"
"time"
)
type DBFriend struct {
@ -110,6 +111,9 @@ func (db *DBFriendRequest) DB2PB(ctx context.Context, friendRequests []*relation
if len(friendRequests) > 0 {
userIDs = append(userIDs, friendRequests[0].FromUserID)
}
for _, v := range friendRequests {
userIDs = append(userIDs, v.ToUserID)
}
users, err := db.userCheck.GetUsersInfoMap(ctx, userIDs, true)
if err != nil {
return nil, err