1
0
mirror of https://github.com/whippyshou/mastodon synced 2024-11-24 15:16:26 +09:00

Fix moderator leak in undo_mark_statuses_as_sensitive (#18525)

Signed-off-by: Eugen Rochko <eugen@zeonfederated.com>

Co-authored-by: 40826d <74816220+40826d@users.noreply.github.com>
This commit is contained in:
Eugen Rochko 2022-05-26 22:04:16 +02:00 committed by GitHub
parent 9f81b9f29a
commit 976cd6413e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,8 +52,9 @@ class ApproveAppealService < BaseService
end
def undo_mark_statuses_as_sensitive!
representative_account = Account.representative
@strike.statuses.includes(:media_attachments).each do |status|
UpdateStatusService.new.call(status, @current_account.id, sensitive: false) if status.with_media?
UpdateStatusService.new.call(status, representative_account.id, sensitive: false) if status.with_media?
end
end