diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-07-21 01:44:16 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-08-30 05:44:01 -0500 |
commit | 263ead73616dba43a0337c2a3edaf96a6382d533 (patch) | |
tree | ca47a9366dbbdf95018c55bde32b59d6b05c8299 /app/workers | |
parent | 21de9efc2d89ce8dbb9edb997f8a3b99f831d05a (diff) |
[Feature] Add post and thread (un)hiding to backend
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/mute_conversation_worker.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/workers/mute_conversation_worker.rb b/app/workers/mute_conversation_worker.rb new file mode 100644 index 000000000..efe6dd539 --- /dev/null +++ b/app/workers/mute_conversation_worker.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +class MuteConversationWorker + include Sidekiq::Worker + + def perform(account_id, conversation_id) + FeedManager.instance.unpush_conversation(Account.find(account_id), Conversation.find(conversation_id)) + rescue ActiveRecord::RecordNotFound + true + end +end |