Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
gwenneg committed Oct 29, 2023
1 parent 326eb23 commit 908a276
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class EmailSubscriptionRepository {
public int subscribeEventType(String orgId, String username, UUID eventTypeId, SubscriptionType subscriptionType) {
// Opt-in: only subscriptions are stored on database
// Opt-on: only un-subscriptions are stored on database
if (subscriptionType.isSubscribedByDefault()) {
if (!subscriptionType.isSubscribedByDefault()) {
return addEventTypeSubscription(orgId, username, eventTypeId, subscriptionType, true);
} else {
return deleteEventTypeSubscription(orgId, username, eventTypeId, subscriptionType);
Expand All @@ -54,7 +54,7 @@ public int addEventTypeSubscription(String orgId, String username, UUID eventTyp
public int unsubscribeEventType(String orgId, String userId, UUID eventTypeId, SubscriptionType subscriptionType) {
// Opt-in: only subscriptions are stored on database
// Opt-on: only un-subscriptions are stored on database
if (subscriptionType.isSubscribedByDefault()) {
if (!subscriptionType.isSubscribedByDefault()) {
return deleteEventTypeSubscription(orgId, userId, eventTypeId, subscriptionType);
} else {
return addEventTypeSubscription(orgId, userId, eventTypeId, subscriptionType, false);
Expand Down

0 comments on commit 908a276

Please sign in to comment.