🐛 Fixes of accounts mentioned messages unable to send

This commit is contained in:
2025-07-22 21:52:44 +08:00
parent 5f64236b59
commit be589aed1d
3 changed files with 27 additions and 2 deletions

View File

@@ -57,6 +57,19 @@ public class AccountServiceGrpc(
return response;
}
public override async Task<GetAccountBatchResponse> LookupAccountBatch(LookupAccountBatchRequest request, ServerCallContext context)
{
var accountNames = request.Names.ToList();
var accounts = await _db.Accounts
.AsNoTracking()
.Where(a => accountNames.Contains(a.Name))
.Include(a => a.Profile)
.ToListAsync();
var response = new GetAccountBatchResponse();
response.Accounts.AddRange(accounts.Select(a => a.ToProtoValue()));
return response;
}
public override async Task<ListAccountsResponse> ListAccounts(ListAccountsRequest request,
ServerCallContext context)
{