From 1dd1c828ebe8237297f6c57f4cbd6a96c41bb9f0 Mon Sep 17 00:00:00 2001 From: Karina Kwiatek Date: Wed, 1 Nov 2023 22:40:02 +0100 Subject: [PATCH] Fix broken mute check in question worker --- app/workers/question_worker.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/workers/question_worker.rb b/app/workers/question_worker.rb index 6cffd5af..d0c9eb98 100644 --- a/app/workers/question_worker.rb +++ b/app/workers/question_worker.rb @@ -12,7 +12,7 @@ class QuestionWorker question = Question.includes(:user).find(question_id) webpush_app = Rpush::App.find_by(name: "webpush") - return if skip_inbox?(follower, question, user) + return if skip_inbox?(follower, question) inbox = Inbox.create(user_id: follower.id, question_id:, new: true) follower.push_notification(webpush_app, inbox) if webpush_app @@ -20,11 +20,11 @@ class QuestionWorker private - def skip_inbox?(follower, question, user) + def skip_inbox?(follower, question) return true if follower.inbox_locked? return true if follower.banned? return true if muted?(follower, question) - return true if user.muting?(question.user) + return true if follower.muting?(question.user) return true if question.long? && !follower.profile.allow_long_questions false