about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-10-17 22:04:40 +0200
committerGitHub <noreply@github.com>2018-10-17 22:04:40 +0200
commit72d7d3003b1e21ef8a6f5112f1e8cb32c72e8992 (patch)
treebc2519f2910d3db389a7257c9583a556575d1c7d /app/models
parentddd30f331c7a2af38176d72d9ce2265068984bed (diff)
Do not show "limited" visibility in default visibility preference (#8999)
* Do not show "limited" visibility in default visibility preference

Fix regression from #8950

* Fix code style issue
Diffstat (limited to 'app/models')
-rw-r--r--app/models/status.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/status.rb b/app/models/status.rb
index b18cb56b2..bcb7dd373 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -238,6 +238,10 @@ class Status < ApplicationRecord
       left_outer_joins(:status_stat).select('statuses.id, greatest(statuses.updated_at, status_stats.updated_at) AS updated_at')
     end
 
+    def selectable_visibilities
+      visibilities.keys - %w(direct limited)
+    end
+
     def in_chosen_languages(account)
       where(language: nil).or where(language: account.chosen_languages)
     end