From 5a4416612c4b4c36f376f2ae815f777abf9a7007 Mon Sep 17 00:00:00 2001 From: Muhsin <12408980+muhsin-k@users.noreply.github.com> Date: Wed, 3 Jun 2026 18:29:15 +0400 Subject: [PATCH] fix(app-store): enable channel feature by default --- app/helpers/super_admin/features.yml | 5 +++++ config/features.yml | 3 +-- ..._repurpose_message_reply_to_flag_for_channel_app_store.rb | 2 +- .../enterprise/billing/reconcile_plan_features_service.rb | 1 + .../enterprise/billing/handle_stripe_event_service_spec.rb | 4 ++++ 5 files changed, 12 insertions(+), 3 deletions(-) diff --git a/app/helpers/super_admin/features.yml b/app/helpers/super_admin/features.yml index 6489d0194..8d1a888ab 100644 --- a/app/helpers/super_admin/features.yml +++ b/app/helpers/super_admin/features.yml @@ -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.' diff --git a/config/features.yml b/config/features.yml index 231f402bd..fe8a98f66 100644 --- a/config/features.yml +++ b/config/features.yml @@ -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 diff --git a/db/migrate/20260522080000_repurpose_message_reply_to_flag_for_channel_app_store.rb b/db/migrate/20260522080000_repurpose_message_reply_to_flag_for_channel_app_store.rb index 191bb7266..6ce52bbb5 100644 --- a/db/migrate/20260522080000_repurpose_message_reply_to_flag_for_channel_app_store.rb +++ b/db/migrate/20260522080000_repurpose_message_reply_to_flag_for_channel_app_store.rb @@ -2,7 +2,7 @@ class RepurposeMessageReplyToFlagForChannelAppStore < ActiveRecord::Migration[7. 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. + # flag starts from plan/default configuration instead of inheriting stale state. Account.feature_channel_app_store.find_each(batch_size: 100) do |account| account.disable_features(:channel_app_store) account.save!(validate: false) diff --git a/enterprise/app/services/enterprise/billing/reconcile_plan_features_service.rb b/enterprise/app/services/enterprise/billing/reconcile_plan_features_service.rb index a6f76f6b5..457bfac6c 100644 --- a/enterprise/app/services/enterprise/billing/reconcile_plan_features_service.rb +++ b/enterprise/app/services/enterprise/billing/reconcile_plan_features_service.rb @@ -11,6 +11,7 @@ class Enterprise::Billing::ReconcilePlanFeaturesService channel_facebook channel_email channel_instagram + channel_app_store channel_tiktok captain_integration advanced_search_indexing diff --git a/spec/enterprise/services/enterprise/billing/handle_stripe_event_service_spec.rb b/spec/enterprise/services/enterprise/billing/handle_stripe_event_service_spec.rb index f9b550ef8..87bae8165 100644 --- a/spec/enterprise/services/enterprise/billing/handle_stripe_event_service_spec.rb +++ b/spec/enterprise/services/enterprise/billing/handle_stripe_event_service_spec.rb @@ -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