Merge commit '3554c527954441fd924586a49c7d99a89101ac7e' into glitch-soc/merge-upstream

Conflicts:
- `app/controllers/authorize_interactions_controller.rb`:
  Small conflict due to our theming system.
- `streaming/index.js`:
  Upstream refactored part of the streaming server.
  We had some extra logic for handling local-only posts.
  Applied the refactor.
This commit is contained in:
Claire
2023-07-30 16:11:55 +02:00
131 changed files with 932 additions and 1197 deletions

View File

@ -139,6 +139,35 @@ RSpec.describe ActivityPub::Activity::Flag do
expect(report.status_ids).to eq []
end
end
context 'when an account is passed but no status' do
let(:mentioned) { Fabricate(:account) }
let(:json) do
{
'@context': 'https://www.w3.org/ns/activitystreams',
id: flag_id,
type: 'Flag',
content: 'Boo!!',
actor: ActivityPub::TagManager.instance.uri_for(sender),
object: [
ActivityPub::TagManager.instance.uri_for(flagged),
],
}.with_indifferent_access
end
before do
subject.perform
end
it 'creates a report with no attached status' do
report = Report.find_by(account: sender, target_account: flagged)
expect(report).to_not be_nil
expect(report.comment).to eq 'Boo!!'
expect(report.status_ids).to eq []
end
end
end
describe '#perform with a defined uri' do