about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/serializers/initial_state_serializer.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/app/serializers/initial_state_serializer.rb b/app/serializers/initial_state_serializer.rb
index cb5b0017e..e22ebfd4d 100644
--- a/app/serializers/initial_state_serializer.rb
+++ b/app/serializers/initial_state_serializer.rb
@@ -61,8 +61,14 @@ class InitialStateSerializer < ActiveModel::Serializer
 
     if object.current_account
       store[:me]                = object.current_account.id.to_s
-      store[:default_privacy]   = object.current_account.user_default_visibility
       store[:default_sensitive] = object.current_account.user_defaults_to_sensitive?
+
+      default_visibility = object.current_account.user_default_visibility
+      if monsterfork_api != :full && default_visibility == 'local'
+        default_visibility = 'unlisted'
+      end
+
+      store[:default_privacy]   = default_visibility
     end
 
     store[:text] = object.text if object.text
@@ -86,4 +92,10 @@ class InitialStateSerializer < ActiveModel::Serializer
   def instance_presenter
     @instance_presenter ||= InstancePresenter.new
   end
+
+  private
+
+  def monsterfork_api
+    instance_options[:monsterfork_api] || object.current_account && object.current_account&.user&.monsterfork_api&.to_sym
+  end
 end