Fix moderator account being exposed in account moderation notification (#30082)
This commit is contained in:
parent
5201882a23
commit
e845594878
2 changed files with 13 additions and 2 deletions
|
@ -138,6 +138,17 @@ RSpec.describe Notification do
|
|||
expect(notification.account).to eq(account)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when activity_type is an AccountWarning' do
|
||||
it 'sets the notification from_account to the recipient of the notification' do
|
||||
account = Fabricate(:account)
|
||||
account_warning = Fabricate(:account_warning, target_account: account)
|
||||
|
||||
notification = Fabricate.build(:notification, activity_type: 'AccountWarning', activity: account_warning, account: account)
|
||||
|
||||
expect(notification.from_account).to eq(account)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe '.preload_cache_collection_target_statuses' do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue