mirror of
https://github.com/mastodon/mastodon.git
synced 2025-09-05 17:31:12 +00:00
Fix interaction policy changes in implicit updates not being saved (#35751)
This commit is contained in:
parent
69ee043f9d
commit
258e5c4938
|
@ -74,7 +74,7 @@ class ActivityPub::ProcessStatusUpdateService < BaseService
|
|||
end
|
||||
|
||||
def update_interaction_policies!
|
||||
@status.quote_approval_policy = @status_parser.quote_policy
|
||||
@status.update(quote_approval_policy: @status_parser.quote_policy)
|
||||
end
|
||||
|
||||
def update_media_attachments!
|
||||
|
|
|
@ -316,6 +316,23 @@ RSpec.describe ActivityPub::FetchRemoteStatusService do
|
|||
expect(existing_status.edits).to_not be_empty
|
||||
end
|
||||
end
|
||||
|
||||
context 'with an implicit update to quoting policy' do
|
||||
let(:object) do
|
||||
note.merge({
|
||||
'content' => existing_status.text,
|
||||
'interactionPolicy' => {
|
||||
'canQuote' => {
|
||||
'automaticApproval' => ['https://www.w3.org/ns/activitystreams#Public'],
|
||||
},
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
it 'updates status' do
|
||||
expect(existing_status.reload.quote_approval_policy).to eq(Status::QUOTE_APPROVAL_POLICY_FLAGS[:public] << 16)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user