about summary refs log tree commit diff
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/home/initial_state.json.rabl14
-rw-r--r--app/views/settings/preferences/show.html.haml2
2 files changed, 9 insertions, 7 deletions
diff --git a/app/views/home/initial_state.json.rabl b/app/views/home/initial_state.json.rabl
index 0e9736f5f..71949ab0e 100644
--- a/app/views/home/initial_state.json.rabl
+++ b/app/views/home/initial_state.json.rabl
@@ -1,24 +1,24 @@
 object false
 
-node(:meta) {
+node(:meta) do
   {
     access_token: @token,
     locale: I18n.locale,
     me: current_account.id,
   }
-}
+end
 
-node(:compose) {
+node(:compose) do
   {
     me: current_account.id,
-    private: current_account.locked?,
+    default_privacy: current_account.user.setting_default_privacy,
   }
-}
+end
 
-node(:accounts) {
+node(:accounts) do
   {
     current_account.id => partial('api/v1/accounts/show', object: current_account),
   }
-}
+end
 
 node(:settings) { @web_settings }
diff --git a/app/views/settings/preferences/show.html.haml b/app/views/settings/preferences/show.html.haml
index 747977f9c..aee0540d2 100644
--- a/app/views/settings/preferences/show.html.haml
+++ b/app/views/settings/preferences/show.html.haml
@@ -7,6 +7,8 @@
   .fields-group
     = f.input :locale, collection: I18n.available_locales, wrapper: :with_label, include_blank: false, label_method: lambda { |locale| human_locale(locale) }
 
+    = f.input :setting_default_privacy, collection: Status.visibilities.keys, wrapper: :with_label, include_blank: false, label_method: lambda { |visibility| I18n.t("statuses.visibilities.#{visibility}") }, required: false
+
   .fields-group
     = f.simple_fields_for :notification_emails, hash_to_object(current_user.settings.notification_emails) do |ff|
       = ff.input :follow, as: :boolean, wrapper: :with_label