diff options
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/activitypub/distribute_poll_update_worker.rb | 2 | ||||
-rw-r--r-- | app/workers/feed_insert_worker.rb | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/app/workers/activitypub/distribute_poll_update_worker.rb b/app/workers/activitypub/distribute_poll_update_worker.rb index 8c1eefd93..ebdb78bb3 100644 --- a/app/workers/activitypub/distribute_poll_update_worker.rb +++ b/app/workers/activitypub/distribute_poll_update_worker.rb @@ -10,7 +10,7 @@ class ActivityPub::DistributePollUpdateWorker @status = Status.find(status_id) @account = @status.account - return unless @status.preloadable_poll + return if @status.preloadable_poll.nil? || @status.local_only? ActivityPub::DeliveryWorker.push_bulk(inboxes, limit: 1_000) do |inbox_url| [payload, @account.id, inbox_url] diff --git a/app/workers/feed_insert_worker.rb b/app/workers/feed_insert_worker.rb index 758cebd4b..ee9a3cadc 100644 --- a/app/workers/feed_insert_worker.rb +++ b/app/workers/feed_insert_worker.rb @@ -14,6 +14,8 @@ class FeedInsertWorker when :list @list = List.find(id) @follower = @list.account + when :direct + @account = Account.find(id) end check_and_insert @@ -40,6 +42,8 @@ class FeedInsertWorker FeedManager.instance.filter?(:tags, @status, @follower) when :list FeedManager.instance.filter?(:list, @status, @list) + when :direct + FeedManager.instance.filter?(:direct, @status, @account) end end @@ -55,6 +59,8 @@ class FeedInsertWorker FeedManager.instance.push_to_home(@follower, @status, update: update?) when :list FeedManager.instance.push_to_list(@list, @status, update: update?) + when :direct + FeedManager.instance.push_to_direct(@account, @status, update: update?) end end @@ -64,6 +70,8 @@ class FeedInsertWorker FeedManager.instance.unpush_from_home(@follower, @status, update: true) when :list FeedManager.instance.unpush_from_list(@list, @status, update: true) + when :direct + FeedManager.instance.unpush_from_direct(@account, @status, update: true) end end |