Funkwhale's answers, deletions and NodeInfo are understood
Three shapes Funkwhale 2.0 sends, each of which lost something: - its Accept is named after the Follow it answers, on our origin (`…#follows/<uuid>/accept`), and was refused as off its actor's origin, so no follow of a channel completed: an Accept or Reject whose id extends the id of the activity it answers, on our origin, is now taken; - a channel deletes its uploads in one Delete without an id, their ids in a list as the object's id: each is deleted; - its NodeInfo discovery names the document under its swagger schema's URL: a link whose path names NodeInfo is taken when no rel is known. 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
3866558d1d
commit
9f0b25e92b
5 files changed
+82
-3
No files matched your search
@@ -38,6 +38,12 @@ namespace PrivaPub.Federation.Objects
|
||||
if (link.ValueKind == JsonValueKind.Object && Text(link, "rel") == schema && Text(link, "href") is { } href
|
||||
&& href.StartsWith("https://", StringComparison.OrdinalIgnoreCase))
|
||||
return (href, schema[(schema.LastIndexOf('/') + 1)..]);
|
||||
// a link to a NodeInfo document under another rel (Funkwhale 2.0 names it after its swagger schema): its path
|
||||
// says what it is, and its last segment the version
|
||||
foreach (var link in list.EnumerateArray())
|
||||
if (link.ValueKind == JsonValueKind.Object && Text(link, "href") is { } href && href.StartsWith("https://", StringComparison.OrdinalIgnoreCase)
|
||||
&& Uri.TryCreate(href, UriKind.Absolute, out var target) && target.AbsolutePath.Contains("/nodeinfo", StringComparison.OrdinalIgnoreCase))
|
||||
return (href, target.Segments[^1].Trim('/') is var last && Schemas.Any(s => s.EndsWith("/" + last, StringComparison.Ordinal)) ? last : "2.0");
|
||||
return default;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user