diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-11-29 12:21:22 -0600 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-11-29 12:21:44 -0600 |
commit | 2711b6f523807dd1b2f1f8a7d5ce71595b5b12bb (patch) | |
tree | 89138a94fde87deda777dabad391a0d92a3cae1e /app/services/fan_out_on_write_service.rb | |
parent | 870ebfe74e9b91249bad6cfaf2b3a5a650d19c2a (diff) |
Only send curated Tavern posts to public timeline
Diffstat (limited to 'app/services/fan_out_on_write_service.rb')
-rw-r--r-- | app/services/fan_out_on_write_service.rb | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/app/services/fan_out_on_write_service.rb b/app/services/fan_out_on_write_service.rb index 679ba8501..01b26d4ba 100644 --- a/app/services/fan_out_on_write_service.rb +++ b/app/services/fan_out_on_write_service.rb @@ -3,22 +3,24 @@ class FanOutOnWriteService < BaseService # Push a status into home and mentions feeds # @param [Status] status - def call(status, only_to_self: false) + def call(status, only_to_self: false, only_to_tavern: false) raise Mastodon::RaceConditionError if status.visibility.nil? - deliver_to_self(status) if status.account.local? - return if only_to_self || !status.published? - - if status.direct_visibility? - deliver_to_mentioned_followers(status) - deliver_to_direct_timelines(status) - deliver_to_own_conversation(status) - elsif status.limited_visibility? - deliver_to_mentioned_followers(status) - deliver_to_lists(status) - else - deliver_to_followers(status) - deliver_to_lists(status) + unless only_to_tavern + deliver_to_self(status) if status.account.local? + return if only_to_self || !status.published? + + if status.direct_visibility? + deliver_to_mentioned_followers(status) + deliver_to_direct_timelines(status) + deliver_to_own_conversation(status) + elsif status.limited_visibility? + deliver_to_mentioned_followers(status) + deliver_to_lists(status) + else + deliver_to_followers(status) + deliver_to_lists(status) + end end return if !status.public_visibility? || status.account.silenced? |