Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Remove channel from member_job

Oliver Güntherdc7b0ff99fd4
diff --git a/app/workers/mails/member_job.rb b/app/workers/mails/member_job.rb
index 46b2027a65a..a92af8bee1f 100644
--- a/app/workers/mails/member_job.rb
+++ b/app/workers/mails/member_job.rb
@@ -90,7 +90,7 @@ class Mails::MemberJob < ApplicationJob
return false if message.present?
NotificationSetting
- .where(project_id: nil, user_id: user_id, channel: NotificationSetting.channels[:mail])
+ .where(project_id: nil, user_id: user_id)
.exists?("membership_#{setting}" => false)
end
end
diff --git a/spec/workers/mails/shared/member_job.rb b/spec/workers/mails/shared/member_job.rb
index 4ea3fac6025..39c59b985b5 100644
--- a/spec/workers/mails/shared/member_job.rb
+++ b/spec/workers/mails/shared/member_job.rb
@@ -129,7 +129,7 @@ shared_examples 'member job' do
let(:principal) do
FactoryBot.create :user,
notification_settings: [
- FactoryBot.build(:mail_notification_setting,
+ FactoryBot.build(:notification_setting,
NotificationSetting::MEMBERSHIP_ADDED => false,
NotificationSetting::MEMBERSHIP_UPDATED => false)
]