fix(app-store): enable channel feature by default

This commit is contained in:
Muhsin
2026-06-03 20:03:52 +04:00
parent 5c204e6647
commit 594bfa0bdf
5 changed files with 11 additions and 22 deletions
+5
View File
@@ -71,6 +71,11 @@ sms:
description: 'Manage your SMS customer interactions from Chatwoot.'
enabled: true
icon: 'icon-message-line'
app_store:
name: 'App Store Reviews'
description: 'Manage your App Store app reviews from Chatwoot.'
enabled: true
icon: 'icon-apps-2-line'
messenger:
name: 'Messenger'
description: 'Stay connected with your customers on Facebook & Instagram.'
+1 -2
View File
@@ -110,8 +110,7 @@
premium: true
- name: channel_app_store
display_name: App Store Reviews Channel
enabled: false
chatwoot_internal: true
enabled: true
- name: insert_article_in_reply
display_name: Insert Article in Reply
enabled: false
@@ -1,20 +0,0 @@
class RepurposeMessageReplyToFlagForChannelAppStore < ActiveRecord::Migration[7.1]
def up
# The message_reply_to flag (deprecated) has been renamed to channel_app_store.
# Disable it on any accounts that had message_reply_to enabled so the repurposed
# flag starts in its intended default-off state.
Account.feature_channel_app_store.find_each(batch_size: 100) do |account|
account.disable_features(:channel_app_store)
account.save!(validate: false)
end
# Remove the stale message_reply_to entry from ACCOUNT_LEVEL_FEATURE_DEFAULTS.
# ConfigLoader only adds new flags; it never removes renamed ones.
config = InstallationConfig.find_by(name: 'ACCOUNT_LEVEL_FEATURE_DEFAULTS')
return if config&.value.blank?
config.value = config.value.reject { |feature| feature['name'] == 'message_reply_to' }
config.save!
GlobalConfig.clear_cache
end
end
@@ -11,6 +11,7 @@ class Enterprise::Billing::ReconcilePlanFeaturesService
channel_facebook
channel_email
channel_instagram
channel_app_store
channel_tiktok
captain_integration
advanced_search_indexing
@@ -272,6 +272,7 @@ describe Enterprise::Billing::HandleStripeEventService do
# But other premium features should be disabled
expect(account).not_to be_feature_enabled('channel_instagram')
expect(account).not_to be_feature_enabled('channel_app_store')
expect(account).not_to be_feature_enabled('help_center')
end
end
@@ -333,6 +334,7 @@ describe Enterprise::Billing::HandleStripeEventService do
account.reload
# Spot check one startup feature
expect(account).to be_feature_enabled('channel_instagram')
expect(account).to be_feature_enabled('channel_app_store')
expect(account).not_to be_feature_enabled('sla')
expect(account).not_to be_feature_enabled('custom_roles')
end
@@ -350,6 +352,7 @@ describe Enterprise::Billing::HandleStripeEventService do
it 'disables all premium features' do
# Verify startup features were enabled
expect(account).to be_feature_enabled('channel_instagram')
expect(account).to be_feature_enabled('channel_app_store')
# Downgrade to Hacker (default) plan
allow(subscription).to receive(:[]).with('plan')
@@ -359,6 +362,7 @@ describe Enterprise::Billing::HandleStripeEventService do
account.reload
# Spot check that premium features are disabled
expect(account).not_to be_feature_enabled('channel_instagram')
expect(account).not_to be_feature_enabled('channel_app_store')
expect(account).not_to be_feature_enabled('help_center')
end
end