Skip to content

Commit

Permalink
Adding realtime notification fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashi1993 committed Dec 9, 2024
1 parent e406966 commit ba4ed70
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,18 +197,14 @@
org.apache.commons.lang3;version="${commons-lang3.version}",
org.apache.commons.logging;version="${commons.logging.version}",
org.json;version="${org.json.version}",
<!-- org.quartz.*;version="${quartz.version}",-->
<!-- com.nimbusds.jose;version="${org.wso2.orbit.nimbus.version.range}",-->
com.fasterxml.jackson.annotation;version="${jackson.databinding.version}",
com.fasterxml.jackson.databind;version="${jackson.databinding.version}",
com.nimbusds.jose;version="${org.wso2.orbit.nimbus.version.range}",
org.wso2.carbon.identity.application.common.*;version="${carbon.identity.framework.version.range}",
org.wso2.carbon.identity.oauth2.*;version="${identity.inbound.auth.oauth.version.range}",
org.wso2.financial.services.accelerator.common.*;version="${project.version}",
org.wso2.financial.services.accelerator.consent.mgt.dao.*;version="${project.version}",
org.wso2.financial.services.accelerator.consent.mgt.service.*;version="${project.version}",
<!-- org.apache.commons.collections4;version="${commons-collections.version}",-->
<!-- org.apache.http.*;version="${orbit.httpcore.version}"-->
org.wso2.financial.services.accelerator.consent.mgt.service.*;version="${project.version}"
</Import-Package>
<DynamicImport-Package>*</DynamicImport-Package>
<Export-Package>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import com.nimbusds.jose.JOSEException;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception;
Expand Down Expand Up @@ -78,7 +79,7 @@ public void run() {
}
});

if (!allowedEvents.isEmpty()) {
if (!allowedEvents.isEmpty() && StringUtils.isNotEmpty(subscription.getCallbackUrl())) {
RealtimeEventNotification realtimeEventNotification = new RealtimeEventNotification();
realtimeEventNotification.setNotification(notification);
realtimeEventNotification.setCallbackUrl(subscription.getCallbackUrl());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
package org.wso2.financial.services.accelerator.event.notifications.service.realtime.service;

import com.nimbusds.jose.JOSEException;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception;
Expand Down Expand Up @@ -71,7 +72,7 @@ public void run() {
}
});

if (!allowedEvents.isEmpty()) {
if (!allowedEvents.isEmpty() && StringUtils.isNotEmpty(subscription.getCallbackUrl())) {
NotificationResponse responseNotification = eventNotificationGenerator.
generateEventNotificationBody(notification, allowedEvents);
RealtimeEventNotification realtimeEventNotification = new RealtimeEventNotification();
Expand Down

0 comments on commit ba4ed70

Please sign in to comment.