A boost or a favourite given again is sent again
Every boost of a post was announce-{post}, and every favourite like-{post}:
after an Undo, giving it again made the same activity id, which the
delivery queue had already delivered and dropped (and a server that
remembers ids would ignore). Found by decePub's e2e actions against the
pasture, which unboost and boost again. Now each boost and favourite is an
activity of its own, as Mastodon's are, and an Undo names the one it ends;
a concurrent second boost is removed after saving. An edit's Update is
named to the millisecond, a quote approval's to the tick.
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
ce473f2741
commit
b710493701
5 files changed
+64
-14
No files matched your search
@@ -170,7 +170,7 @@ namespace PrivaPub.Tests.Http
|
||||
var announce = items[0];
|
||||
Assert.Equal("Announce", announce["type"]!.GetValue<string>());
|
||||
Assert.Equal(reblog.ObjectURI, announce["id"]!.GetValue<string>());
|
||||
Assert.Equal($"{persona.ActorUri()}/grunts/announce-{boosted.ID}", announce["id"]!.GetValue<string>());
|
||||
Assert.Equal($"{persona.ActorUri()}/grunts/announce-{reblog.ID}", announce["id"]!.GetValue<string>());
|
||||
Assert.Equal(boosted.ObjectURI, announce["object"]!.GetValue<string>());
|
||||
Assert.Equal(persona.ActorUri(), announce["actor"]!.GetValue<string>());
|
||||
|
||||
@@ -436,7 +436,7 @@ namespace PrivaPub.Tests.Http
|
||||
string Path(string id) => $"/peasants/{persona.UserName}/grunts/{id}";
|
||||
|
||||
var create = await _client.Fetch(Path($"create-{post.ID}"));
|
||||
var announce = await _client.Fetch(Path($"announce-{original.ID}"));
|
||||
var announce = await _client.Fetch(Path($"announce-{reblog.ID}"));
|
||||
|
||||
Assert.Equal(HttpStatusCode.OK, create.Status);
|
||||
Assert.Equal(ActivityJson, create.MediaType);
|
||||
@@ -451,7 +451,8 @@ namespace PrivaPub.Tests.Http
|
||||
|
||||
foreach (var unknown in new[] { $"create-{followersOnly.ID}", $"create-{Guid.NewGuid():N}"[..31], $"announce-{post.ID}", $"like-{post.ID}", "x" })
|
||||
Assert.Equal(HttpStatusCode.NotFound, (await _client.Fetch(Path(unknown))).Status);
|
||||
Assert.Equal(HttpStatusCode.NotFound, (await _client.Fetch($"/peasants/{friend.UserName}/grunts/announce-{original.ID}")).Status);
|
||||
Assert.Equal(HttpStatusCode.NotFound, (await _client.Fetch(Path($"announce-{original.ID}"))).Status);
|
||||
Assert.Equal(HttpStatusCode.NotFound, (await _client.Fetch($"/peasants/{friend.UserName}/grunts/announce-{reblog.ID}")).Status);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
Reference in new issue
Block a user