Fix for rest-hook subscriptions are not becoming active #675
This commit is contained in:
parent
e0f23880e1
commit
eea44b4b9a
|
@ -334,8 +334,9 @@ public class RestHookSubscriptionDstu2Interceptor extends BaseRestHookSubscripti
|
|||
Subscription subscription = (Subscription) theResource;
|
||||
if (subscription.getChannel() != null
|
||||
&& subscription.getChannel().getTypeElement().getValueAsEnum() == SubscriptionChannelTypeEnum.REST_HOOK
|
||||
&& subscription.getStatusElement().getValueAsEnum() == SubscriptionStatusEnum.ACTIVE) {
|
||||
&& subscription.getStatusElement().getValueAsEnum() == SubscriptionStatusEnum.REQUESTED) {
|
||||
removeLocalSubscription(subscription.getIdElement().getIdPart());
|
||||
subscription.setStatus(SubscriptionStatusEnum.ACTIVE);
|
||||
myRestHookSubscriptions.add(subscription);
|
||||
ourLog.info("Subscription was added. Id: " + subscription.getId());
|
||||
}
|
||||
|
|
|
@ -325,8 +325,9 @@ public class RestHookSubscriptionDstu3Interceptor extends BaseRestHookSubscripti
|
|||
Subscription subscription = (Subscription) theResource;
|
||||
if (subscription.getChannel() != null
|
||||
&& subscription.getChannel().getType() == Subscription.SubscriptionChannelType.RESTHOOK
|
||||
&& subscription.getStatus() == Subscription.SubscriptionStatus.ACTIVE) {
|
||||
&& subscription.getStatus() == Subscription.SubscriptionStatus.REQUESTED) {
|
||||
removeLocalSubscription(subscription.getIdElement().getIdPart());
|
||||
subscription.setStatus(Subscription.SubscriptionStatus.ACTIVE);
|
||||
myRestHookSubscriptions.add(subscription);
|
||||
ourLog.info("Subscription was added, id: {} - Have {}", subscription.getIdElement().getIdPart(), myRestHookSubscriptions.size());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue