about summary refs log tree commit diff
path: root/spec/lib/activitypub/tag_manager_spec.rb
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2021-09-08 23:33:23 +0200
committerGitHub <noreply@github.com>2021-09-08 23:33:23 +0200
commit12cd097e7ca208280ec4cd3ffd558aac79b67428 (patch)
tree43a7df57af8ba2d4513e89df79fd1f727d8ea9ae /spec/lib/activitypub/tag_manager_spec.rb
parent7c7e78d807a64164e3728f2e6be9d017145ebc79 (diff)
Fix addressing of remote groups' followers (#16700)
Fixes #16699
Diffstat (limited to 'spec/lib/activitypub/tag_manager_spec.rb')
-rw-r--r--spec/lib/activitypub/tag_manager_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/lib/activitypub/tag_manager_spec.rb b/spec/lib/activitypub/tag_manager_spec.rb
index 1c5c6f0ed..606a1de2e 100644
--- a/spec/lib/activitypub/tag_manager_spec.rb
+++ b/spec/lib/activitypub/tag_manager_spec.rb
@@ -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')