about summary refs log tree commit diff
path: root/app/services
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-04-30 21:51:24 +0200
committerThibG <thib@sitedethib.com>2019-05-01 22:33:09 +0200
commitfcbf557bd2c4db3734e328ffe434895457836478 (patch)
tree0a9926a3a39857e1f9ea25fd5e197fa94993d6f1 /app/services
parentcc5a81b7d87fbd0db67781ebc21e3805876fbb74 (diff)
Add site-wide options to show reblogs and replies in local/public timelines
Fixes #1021
Diffstat (limited to 'app/services')
-rw-r--r--app/services/fan_out_on_write_service.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/services/fan_out_on_write_service.rb b/app/services/fan_out_on_write_service.rb
index de7c031d8..b66dc342e 100644
--- a/app/services/fan_out_on_write_service.rb
+++ b/app/services/fan_out_on_write_service.rb
@@ -21,11 +21,12 @@ class FanOutOnWriteService < BaseService
       deliver_to_lists(status)
     end
 
-    return if status.account.silenced? || !status.public_visibility? || status.reblog?
+    return if status.account.silenced? || !status.public_visibility?
+    return if status.reblog? && !Setting.show_reblogs_in_public_timelines
 
     deliver_to_hashtags(status)
 
-    return if status.reply? && status.in_reply_to_account_id != status.account_id
+    return if status.reply? && status.in_reply_to_account_id != status.account_id && !Setting.show_replies_in_public_timelines
 
     deliver_to_public(status)
     deliver_to_media(status) if status.media_attachments.any?