diff options
author | ThibG <thib@sitedethib.com> | 2020-09-08 17:20:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-08 17:20:00 +0200 |
commit | 6e83020950ab81c6be6b3bfec92643f1b0d23ce6 (patch) | |
tree | ccd775be4b73170fcbf45407b84ad35fc37fb853 /app/workers | |
parent | 437d71bddf967573df3912ee5976f7c5a5a7b4c7 (diff) | |
parent | 9748f074a385fce5ad6913b1a22fb7ea9e7566db (diff) |
Merge pull request #1419 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/feed_insert_worker.rb | 10 | ||||
-rw-r--r-- | app/workers/merge_worker.rb | 4 | ||||
-rw-r--r-- | app/workers/mute_worker.rb | 7 | ||||
-rw-r--r-- | app/workers/unmerge_worker.rb | 4 |
4 files changed, 14 insertions, 11 deletions
diff --git a/app/workers/feed_insert_worker.rb b/app/workers/feed_insert_worker.rb index 546f5c0c2..fd35af562 100644 --- a/app/workers/feed_insert_worker.rb +++ b/app/workers/feed_insert_worker.rb @@ -29,13 +29,13 @@ class FeedInsertWorker end def feed_filtered? - # Note: Lists are a variation of home, so the filtering rules - # of home apply to both case @type - when :home, :list - FeedManager.instance.filter?(:home, @status, @follower.id) + when :home + FeedManager.instance.filter?(:home, @status, @follower) + when :list + FeedManager.instance.filter?(:list, @status, @list) when :direct - FeedManager.instance.filter?(:direct, @status, @account.id) + FeedManager.instance.filter?(:direct, @status, @account) end end diff --git a/app/workers/merge_worker.rb b/app/workers/merge_worker.rb index d745cb99c..74ef7d4da 100644 --- a/app/workers/merge_worker.rb +++ b/app/workers/merge_worker.rb @@ -6,6 +6,8 @@ class MergeWorker sidekiq_options queue: 'pull' def perform(from_account_id, into_account_id) - FeedManager.instance.merge_into_timeline(Account.find(from_account_id), Account.find(into_account_id)) + FeedManager.instance.merge_into_home(Account.find(from_account_id), Account.find(into_account_id)) + rescue ActiveRecord::RecordNotFound + true end end diff --git a/app/workers/mute_worker.rb b/app/workers/mute_worker.rb index 7bf0923a5..c74f657cb 100644 --- a/app/workers/mute_worker.rb +++ b/app/workers/mute_worker.rb @@ -4,9 +4,8 @@ class MuteWorker include Sidekiq::Worker def perform(account_id, target_account_id) - FeedManager.instance.clear_from_timeline( - Account.find(account_id), - Account.find(target_account_id) - ) + FeedManager.instance.clear_from_home(Account.find(account_id), Account.find(target_account_id)) + rescue ActiveRecord::RecordNotFound + true end end diff --git a/app/workers/unmerge_worker.rb b/app/workers/unmerge_worker.rb index ea6aacebf..1a23faae5 100644 --- a/app/workers/unmerge_worker.rb +++ b/app/workers/unmerge_worker.rb @@ -6,6 +6,8 @@ class UnmergeWorker sidekiq_options queue: 'pull' def perform(from_account_id, into_account_id) - FeedManager.instance.unmerge_from_timeline(Account.find(from_account_id), Account.find(into_account_id)) + FeedManager.instance.unmerge_from_home(Account.find(from_account_id), Account.find(into_account_id)) + rescue ActiveRecord::RecordNotFound + true end end |