A community's comments reach its microblog members
A comment in a community was announced only as Announce{Create}, which
Akkoma, Mastodon and Misskey drop: their members never saw it (the village
found Akkoma's missing). A comment is now also announced as itself, as a
new post already was; Lemmy answers that form 400, harmlessly. Nothing is
decided by the follower's software.
The town's checker expects a followers-only quote to stay with the
followers, and G-0003 covers only Lemmy-hosted communities (their relayed
moderation), since relayed likes count.
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
9268968fd4
commit
aecbf620a8
7 files changed
+34
-6
No files matched your search
@@ -90,6 +90,28 @@ namespace PrivaPub.Tests.Federation
|
||||
Assert.Contains(announces, a => a["object"] is JsonValue);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task A_comment_in_a_community_is_announced_activity_and_object_too()
|
||||
{
|
||||
var (_, owner) = await _harness.Persona("owner");
|
||||
var (_, community) = await Group(GroupKind.Community, PostingPolicy.Followers, owner.Id);
|
||||
var lemmy = new RemoteActor(_harness.Peer, "lemmy");
|
||||
var akkoma = new RemoteActor(_harness.Peer, "akkoma");
|
||||
await _harness.FollowedBy(community, lemmy);
|
||||
await _harness.FollowedBy(community, akkoma);
|
||||
var thread = Create(lemmy, new[] { community.Uri, Addressing.Public }, community.Uri);
|
||||
await _harness.Deliver(lemmy, "/human-centipede", thread);
|
||||
var comment = Create(lemmy, new[] { community.Uri, Addressing.Public }, community.Uri);
|
||||
comment["object"]!["inReplyTo"] = thread["object"]!["id"]!.GetValue<string>();
|
||||
|
||||
await _harness.Deliver(lemmy, "/human-centipede", comment);
|
||||
|
||||
var commentId = comment["object"]!["id"]!.GetValue<string>();
|
||||
var announces = (await _harness.Outgoing(akkoma.SharedInbox)).Where(a => a["actor"]!.GetValue<string>() == community.Uri).ToList();
|
||||
Assert.Contains(announces, a => a["object"] is JsonObject inner && inner["object"]?["id"]?.GetValue<string>() == commentId);
|
||||
Assert.Contains(announces, a => a["object"] is JsonValue bare && bare.GetValue<string>() == commentId);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task An_open_community_takes_posts_from_anyone()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user