-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5927 from signalco-io/renovate/pulumiverse-vercel…
…-1.x fix(deps): update dependency @pulumiverse/vercel to v1.14.2
- Loading branch information
Showing
18 changed files
with
153 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
cloud/src/Signal.Core/Notifications/NotificationEmailService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
using Azure.Communication.Email; | ||
using Signal.Core.Secrets; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
||
namespace Signal.Core.Notifications; | ||
|
||
internal class NotificationEmailService(ISecretsProvider secretsProvider) : INotificationSmtpService | ||
{ | ||
public async Task SendAsync( | ||
string recipientEmail, | ||
string title, | ||
string content, | ||
string? sender = "system", | ||
CancellationToken cancellationToken = default) | ||
{ | ||
var acsConnectionString = await secretsProvider.GetSecretAsync(SecretKeys.AzureCommunicationServices.ConnectionString, cancellationToken); | ||
var acsDomain = await secretsProvider.GetSecretAsync(SecretKeys.AzureCommunicationServices.Domain, cancellationToken); | ||
|
||
|
||
var emailClient = new EmailClient(acsConnectionString); | ||
var emailSendOperation = await emailClient.SendAsync( | ||
Azure.WaitUntil.Started, | ||
$"{sender ?? "system"}@{acsDomain}", | ||
recipientEmail, | ||
title, | ||
content, | ||
cancellationToken: cancellationToken); | ||
|
||
while (true) | ||
{ | ||
await emailSendOperation.UpdateStatusAsync(cancellationToken); | ||
if (emailSendOperation.HasCompleted) | ||
{ | ||
break; | ||
} | ||
await Task.Delay(100, cancellationToken); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 0 additions & 31 deletions
31
cloud/src/Signal.Core/Notifications/NotificationSmtpService.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.