diff --git a/app/javascript/gabsocial/initial_state.js b/app/javascript/gabsocial/initial_state.js index a69b5515..66d84a9e 100644 --- a/app/javascript/gabsocial/initial_state.js +++ b/app/javascript/gabsocial/initial_state.js @@ -17,7 +17,6 @@ export const repository = getMeta('repository'); export const source_url = getMeta('source_url'); export const version = getMeta('version'); export const isStaff = getMeta('is_staff'); -export const promotions = initialState && initialState.promotions; export const unreadCount = getMeta('unread_count'); export const lastReadNotificationId = getMeta('last_read_notification_id'); export const monthlyExpensesComplete = getMeta('monthly_expenses_complete'); diff --git a/app/serializers/initial_state_serializer.rb b/app/serializers/initial_state_serializer.rb index b0352dd4..3e828bca 100644 --- a/app/serializers/initial_state_serializer.rb +++ b/app/serializers/initial_state_serializer.rb @@ -2,8 +2,7 @@ class InitialStateSerializer < ActiveModel::Serializer attributes :meta, :compose, :accounts, - :media_attachments, :settings, - :promotions + :media_attachments, :settings has_one :push_subscription, serializer: REST::WebPushSubscriptionSerializer @@ -65,16 +64,6 @@ class InitialStateSerializer < ActiveModel::Serializer { accept_content_types: MediaAttachment::IMAGE_FILE_EXTENSIONS + MediaAttachment::VIDEO_FILE_EXTENSIONS + MediaAttachment::IMAGE_MIME_TYPES + MediaAttachment::VIDEO_MIME_TYPES } end - def promotions - if object.current_account - if object.current_account.is_pro - return [] - end - end - - ActiveModelSerializers::SerializableResource.new(Promotion.active, each_serializer: REST::PromotionSerializer) - end - private def unread_count(account)