Personas a remote post is addressed to see it, named or not
A remote post decided who here may see it by its Mention tags alone. A followers-only post addressed in to or cc to a persona without naming it (Akkoma's to[], or a GoToSocial edit that took the @name out while the post stayed addressed to the persona) was hidden from that persona. Such personas are now kept as silent mentions, as Mastodon does: they see the post and it reaches their home, and no list shows them as mentioned. An edit never narrows who a post was for. The GoToSocial note that showed it is the first captured fixture (Fixtures/gotosocial), and parses with its lone tag, to and cc. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LsXgEaXee4GCU1hwYgPJXw
This commit is contained in:
1 parent
b9286c2c6e
commit
08acdc0503
7 files changed
+62
-10
No files matched your search
@@ -263,6 +263,28 @@ namespace PrivaPub.Tests.Federation
|
||||
Assert.Equal(alice.Id, mention.AccountId);
|
||||
}
|
||||
|
||||
// GoToSocial kept a persona in cc after an edit took the @name out, and Akkoma addresses with to[] alone: the persona it
|
||||
// is addressed to sees a followers-only post as a silent mention, which no list shows as a mention (found by the town)
|
||||
[Fact]
|
||||
public async Task A_followers_only_post_addressed_to_a_persona_without_naming_it_is_a_silent_mention()
|
||||
{
|
||||
var token = TestContext.Current.CancellationToken;
|
||||
var alice = await LocalAvatar("alice");
|
||||
var bob = new RemoteActor(_peer, "bob");
|
||||
var create = PublicCreate(bob, default, alice.Uri);
|
||||
create["object"]!["to"] = bob.Id + "/followers";
|
||||
create["object"]!["cc"] = alice.Uri;
|
||||
|
||||
await Deliver(bob, "/human-centipede", create);
|
||||
|
||||
var post = await DB.Default.Find<Post>().Match(p => p.ActorURI == bob.Id).ExecuteSingleAsync(token);
|
||||
Assert.Equal(PostVisibility.FollowersOnly, post.Visibility);
|
||||
var mention = Assert.Single(post.Mentions);
|
||||
Assert.True(mention.Silent);
|
||||
Assert.Equal(alice.Id, mention.AccountId);
|
||||
Assert.True(await PrivaPub.Domain.Privacy.VisibilityPolicy.CanSee(post, alice.Id, token));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task A_suspended_domain_is_dropped_before_its_key_is_fetched()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user