添加项目文件。

This commit is contained in:
2026-05-09 17:06:30 +08:00
parent c60f5fe117
commit 720ef957d4
378 changed files with 14843 additions and 0 deletions
@@ -0,0 +1,35 @@
using ContactService.WebApi.Application.Friend;
using Grpc.Core;
using IM.Protocols.Grpc.Contact;
namespace ContactService.WebApi.Services
{
public class ContactintegrationService: ContactInternal.ContactInternalBase
{
private readonly Application.Friend.FriendService friendService;
public ContactintegrationService(FriendService friendService)
{
this.friendService = friendService;
}
public override async Task<CheckFriendshipResponse> CheckFriendship(CheckFriendshipRequest request, ServerCallContext context)
{
var response = new CheckFriendshipResponse();
var res = await friendService.CheckFriendAsync(
Guid.Parse(request.OwnerId),
Guid.Parse(request.TargetId)
);
if(res.Succeeded && res.Data)
{
response.Checked = true;
}
else
{
response.Checked = false;
}
return response;
}
}
}