about summary refs log tree commit diff
path: root/app/services
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-03-08 16:11:49 +0100
committerGitHub <noreply@github.com>2020-03-08 16:11:49 +0100
commit5284e29e2f0f2fd637c661b7063a3058e45d8f25 (patch)
treea8966ac7d12984f95289f047efc32b76d7ca1312 /app/services
parentaa67036b41d37935210c8b5094ac20c153a62011 (diff)
Fix public posts from silenced accounts not being changed to unlisted visibility (#13096)
Diffstat (limited to 'app/services')
-rw-r--r--app/services/post_status_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb
index 1bbd625b4..2301621ab 100644
--- a/app/services/post_status_service.rb
+++ b/app/services/post_status_service.rb
@@ -50,7 +50,7 @@ class PostStatusService < BaseService
   def preprocess_attributes!
     @text         = @options.delete(:spoiler_text) if @text.blank? && @options[:spoiler_text].present?
     @visibility   = @options[:visibility] || @account.user&.setting_default_privacy
-    @visibility   = :unlisted if @visibility == :public && @account.silenced?
+    @visibility   = :unlisted if @visibility&.to_sym == :public && @account.silenced?
     @scheduled_at = @options[:scheduled_at]&.to_datetime
     @scheduled_at = nil if scheduled_in_the_past?
   rescue ArgumentError