mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-05 05:12:45 +08:00
* pb * fix: Modifying other fields while setting IsPrivateChat does not take effect * fix: quote message error revoke * refactoring scheduled tasks * refactoring scheduled tasks * refactoring scheduled tasks * refactoring scheduled tasks * refactoring scheduled tasks * refactoring scheduled tasks * rpc client * rpc client * rpc client * rpc client * rpc client * rpc client * rpc client * rpc client
24 lines
682 B
Go
24 lines
682 B
Go
package rpcli
|
|
|
|
import (
|
|
"context"
|
|
"github.com/openimsdk/protocol/relation"
|
|
"google.golang.org/grpc"
|
|
)
|
|
|
|
func NewRelationClient(cc grpc.ClientConnInterface) *RelationClient {
|
|
return &RelationClient{relation.NewFriendClient(cc)}
|
|
}
|
|
|
|
type RelationClient struct {
|
|
relation.FriendClient
|
|
}
|
|
|
|
func (x *RelationClient) GetFriendsInfo(ctx context.Context, ownerUserID string, friendUserIDs []string) ([]*relation.FriendInfoOnly, error) {
|
|
if len(friendUserIDs) == 0 {
|
|
return nil, nil
|
|
}
|
|
req := &relation.GetFriendInfoReq{OwnerUserID: ownerUserID, FriendUserIDs: friendUserIDs}
|
|
return extractField(ctx, x.FriendClient.GetFriendInfo, req, (*relation.GetFriendInfoResp).GetFriendInfos)
|
|
}
|