Compare commits

...

3 Commits

Author SHA1 Message Date
Claire
61ba1f29ee
Merge b88f0f152c into e9170e2de1 2025-07-09 17:06:32 +00:00
Claire
b88f0f152c Fix tests 2024-10-17 13:08:26 +02:00
Claire
af018df524 Fix follow notifications being filtered
Fixes #32441
2024-10-17 11:42:20 +02:00
2 changed files with 5 additions and 5 deletions

View File

@ -44,7 +44,7 @@ class Notification < ApplicationRecord
filterable: true, filterable: true,
}.freeze, }.freeze,
follow: { follow: {
filterable: true, filterable: false,
}.freeze, }.freeze,
follow_request: { follow_request: {
filterable: true, filterable: true,

View File

@ -8,8 +8,8 @@ RSpec.describe NotifyService do
let(:user) { Fabricate(:user) } let(:user) { Fabricate(:user) }
let(:recipient) { user.account } let(:recipient) { user.account }
let(:sender) { Fabricate(:account, domain: 'example.com') } let(:sender) { Fabricate(:account, domain: 'example.com') }
let(:activity) { Fabricate(:follow, account: sender, target_account: recipient) } let(:activity) { Fabricate(:mention, account: recipient, status: Fabricate(:status, account: sender)) }
let(:type) { :follow } let(:type) { :mention }
it { expect { subject }.to change(Notification, :count).by(1) } it { expect { subject }.to change(Notification, :count).by(1) }
@ -98,7 +98,7 @@ RSpec.describe NotifyService do
describe 'email' do describe 'email' do
before do before do
user.settings.update('notification_emails.follow': enabled) user.settings.update('notification_emails.mention': enabled)
user.save user.save
end end
@ -113,7 +113,7 @@ RSpec.describe NotifyService do
expect(emails.first) expect(emails.first)
.to have_attributes( .to have_attributes(
to: contain_exactly(user.email), to: contain_exactly(user.email),
subject: eq(I18n.t('notification_mailer.follow.subject', name: sender.acct)) subject: eq(I18n.t('notification_mailer.mention.subject', name: sender.acct))
) )
end end
end end