Refactor SendAsync method in MessagingServiceClient

The `SendAsync` method in the `MessagingServiceClient` class has been refactored. It no longer uses the `async` keyword and instead directly returns the `Task` from `sender.Send`. This change simplifies the method by removing the `await` operation, while still maintaining asynchronous behavior through the returned `Task`.
This commit is contained in:
2026-11-04 15:28:51 +01:00
parent a7d8b3412b
commit 50b92115bb

View File

@@ -16,9 +16,9 @@ public class MessagingServiceClient(ISender sender)
/// <param name="email"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public async Task SendAsync(Email email, CancellationToken cancellationToken = default)
public Task SendAsync(Email email, CancellationToken cancellationToken = default)
{
await sender.Send(new PublishEmailViaSmtpCommand()
return sender.Send(new PublishEmailViaSmtpCommand()
{
Sender = new GetEmailAccountQuery()
{