mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-08-29 15:45:53 +08:00
friend
This commit is contained in:
parent
19f5354721
commit
04347bcc0d
@ -2,13 +2,14 @@ package convert
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
|
||||||
discoveryRegistry "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry"
|
discoveryRegistry "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry"
|
||||||
sdk "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws"
|
sdk "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws"
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient/check"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient/check"
|
||||||
utils2 "github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
|
utils2 "github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
|
||||||
utils "github.com/OpenIMSDK/open_utils"
|
utils "github.com/OpenIMSDK/open_utils"
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type DBFriend struct {
|
type DBFriend struct {
|
||||||
@ -110,6 +111,9 @@ func (db *DBFriendRequest) DB2PB(ctx context.Context, friendRequests []*relation
|
|||||||
if len(friendRequests) > 0 {
|
if len(friendRequests) > 0 {
|
||||||
userIDs = append(userIDs, friendRequests[0].FromUserID)
|
userIDs = append(userIDs, friendRequests[0].FromUserID)
|
||||||
}
|
}
|
||||||
|
for _, v := range friendRequests {
|
||||||
|
userIDs = append(userIDs, v.ToUserID)
|
||||||
|
}
|
||||||
users, err := db.userCheck.GetUsersInfoMap(ctx, userIDs, true)
|
users, err := db.userCheck.GetUsersInfoMap(ctx, userIDs, true)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
Loading…
x
Reference in New Issue
Block a user