Skip to content

Commit

Permalink
Merge pull request #864 from Malith-19/SMS-handler-change
Browse files Browse the repository at this point in the history
Change the SMS handler to default in username recovery notify.
  • Loading branch information
RushanNanayakkara authored Oct 15, 2024
2 parents c6ba00a + 2536b16 commit f8d0c11
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,13 @@ public UsernameRecoverDTO notify(String recoveryCode, String channelId, String t

// If the notifications are externally managed we do not need to send notifications internally.
if (!NotificationChannels.EXTERNAL_CHANNEL.getChannelType().equals(notificationChannel)) {
String eventName = Utils.resolveEventName(notificationChannel);
String eventName;
if (NotificationChannels.SMS_CHANNEL.getChannelType().equals(notificationChannel)) {
eventName = IdentityRecoveryConstants.NOTIFICATION_EVENTNAME_PREFIX + notificationChannel
+ IdentityRecoveryConstants.NOTIFICATION_EVENTNAME_SUFFIX;
} else {
eventName = Utils.resolveEventName(notificationChannel);
}
validateCallbackURL(properties, userRecoveryData.getUser());
triggerNotification(userRecoveryData.getUser(), notificationChannel, eventName, properties);
}
Expand Down

0 comments on commit f8d0c11

Please sign in to comment.