添加项目文件。
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
using IM.Commons;
|
||||
using IM.Protocols.Grpc.Conversation;
|
||||
|
||||
namespace ConnectorService.Services
|
||||
{
|
||||
public class ConversationIntegrationService : IConversationIntergrationService
|
||||
{
|
||||
private readonly ConversationInternal.ConversationInternalClient client;
|
||||
public async Task<List<string>> GetUserStreamKeysAsync(Guid userId)
|
||||
{
|
||||
var req = new GetUserStreamKeysRequest()
|
||||
{
|
||||
UserId = userId.ToString()
|
||||
};
|
||||
var res = await client.GetUserStreamKeysAsync(req);
|
||||
if(res == null)
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
var list = new List<string>();
|
||||
foreach(var item in res.StreamKeys)
|
||||
{
|
||||
list.Add(item);
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user