Skip to content

Commit

Permalink
Sms Message should be sent to Phone Number (#16925)
Browse files Browse the repository at this point in the history
  • Loading branch information
infofromca authored Oct 24, 2024
1 parent bd93e29 commit 6b9bcac
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ public async Task<bool> TrySendAsync(object notify, INotificationMessage message
{
var user = notify as User;

if (string.IsNullOrEmpty(user?.Email))
if (string.IsNullOrEmpty(user?.PhoneNumber))
{
return false;
}

var mailMessage = new SmsMessage()
var smsMessage = new SmsMessage()
{
To = user.Email,
To = user.PhoneNumber,
Body = message.TextBody,
};

var result = await _smsService.SendAsync(mailMessage);
var result = await _smsService.SendAsync(smsMessage);

return result.Succeeded;
}
Expand Down

0 comments on commit 6b9bcac

Please sign in to comment.