From 263ead73616dba43a0337c2a3edaf96a6382d533 Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Tue, 21 Jul 2020 01:44:16 -0500 Subject: [Feature] Add post and thread (un)hiding to backend --- app/workers/mute_conversation_worker.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 app/workers/mute_conversation_worker.rb (limited to 'app/workers') 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 -- cgit