Notices where this attachment appears
-
Oh, joy: it turns out that Go's net/url package doesn't understand that DID URLs can have paths.
Parsing "https://example.social/path/to/object" gives me a useful result:
&url.URL{
Scheme:"https",
Opaque:"",
Host:"example.social",
Path:"/path/to/object",
[...]
}But parsing "did:ap: key:z6abcdef/path/to/object" gives me this:
&url.URL{
Scheme:"did",
Opaque:"ap:key:z6abcdef/path/to/object",
Host:"",
Path:"",
[...]
}So I need some kind of wrapper to detect DID URLs and parse the paths out of them. That's easy enough, I suppose, but then I need to actually use that wrapper, in all the relevant places...
#ActivityPub #FediDev #BangHeadHere