0
0
Fork 0

Fix addressing of remote groups' followers (#16700)

Fixes #16699
This commit is contained in:
Claire 2021-09-08 23:33:23 +02:00 committed by GitHub
parent 7c7e78d807
commit 12cd097e7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 11 deletions

View file

@ -42,6 +42,14 @@ RSpec.describe ActivityPub::TagManager do
expect(subject.to(status)).to eq [subject.uri_for(mentioned)]
end
it "returns URIs of mentioned group's followers for direct statuses to groups" do
status = Fabricate(:status, visibility: :direct)
mentioned = Fabricate(:account, domain: 'remote.org', uri: 'https://remote.org/group', followers_url: 'https://remote.org/group/followers', actor_type: 'Group')
status.mentions.create(account: mentioned)
expect(subject.to(status)).to include(subject.uri_for(mentioned))
expect(subject.to(status)).to include(subject.followers_uri_for(mentioned))
end
it "returns URIs of mentions for direct silenced author's status only if they are followers or requesting to be" do
bob = Fabricate(:account, username: 'bob')
alice = Fabricate(:account, username: 'alice')