Merge pull request #710 from jamesagnew/issue675-activate-subscriptions
Fix for rest-hook subscriptions are not becoming active #675
This commit is contained in:
commit
b16c94bb0a
|
@ -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