diff --git a/components/org.wso2.carbon.identity.recovery/src/main/java/org/wso2/carbon/identity/recovery/internal/service/impl/username/UsernameRecoveryManagerImpl.java b/components/org.wso2.carbon.identity.recovery/src/main/java/org/wso2/carbon/identity/recovery/internal/service/impl/username/UsernameRecoveryManagerImpl.java index 5fd5ebcf9a..23d2780213 100644 --- a/components/org.wso2.carbon.identity.recovery/src/main/java/org/wso2/carbon/identity/recovery/internal/service/impl/username/UsernameRecoveryManagerImpl.java +++ b/components/org.wso2.carbon.identity.recovery/src/main/java/org/wso2/carbon/identity/recovery/internal/service/impl/username/UsernameRecoveryManagerImpl.java @@ -171,7 +171,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); }