1
0
Fork 0

remove redundant sub client check

Dieser Commit ist enthalten in:
merefield 2023-09-24 10:03:38 +01:00
Ursprung 7f245d6a59
Commit a8af37b334

Datei anzeigen

@ -105,7 +105,6 @@ class CustomWizard::Subscription
:product_slug :product_slug
def initialize def initialize
if CustomWizard::Subscription.client_installed?
result = DiscourseSubscriptionClient.find_subscriptions("discourse-custom-wizard") result = DiscourseSubscriptionClient.find_subscriptions("discourse-custom-wizard")
if result&.any? if result&.any?
@ -123,7 +122,6 @@ class CustomWizard::Subscription
@product_id = id_and_slug[:id] @product_id = id_and_slug[:id]
@product_slug = id_and_slug[:slug] @product_slug = id_and_slug[:slug]
end end
end
@product_slug ||= ENV["CUSTOM_WIZARD_PRODUCT_SLUG"] @product_slug ||= ENV["CUSTOM_WIZARD_PRODUCT_SLUG"]
end end
@ -176,10 +174,6 @@ class CustomWizard::Subscription
product_slug === "community" product_slug === "community"
end end
def self.client_installed?
defined?(DiscourseSubscriptionClient) == 'constant' && DiscourseSubscriptionClient.class == Module
end
def self.subscribed? def self.subscribed?
new.subscribed? new.subscribed?
end end