ckolderup / postmarks

a single-user bookmarking website designed to live on the Fediverse
https://postmarks.glitch.me
MIT License
452 stars 38 forks source link

Unable to follow @bsky.brid.gy@bsky.brid.gy user #191

Open TomCasavant opened 2 months ago

TomCasavant commented 2 months ago

Attempted to follow @bsky.brid.gy@bsky.brid.gy but it couldn't find the webfinger address for the exact same reasons as in #185 Made the suggested change to drop the '/' from the webfinger URL which allowed it to find the inbox I removed the '.json' from the inbox because I was getting this error:

https://bsky.brid.gy/.well-known/webfinger?resource=acct:bsky.brid.gy@bsky.brid.gy
Profile URL
https://bsky.brid.gy/bsky.brid.gy
{ error: "Couldn't resolve bsky.brid.gy.json as a atproto handle" }

Which was successful, but then I received this error from the brid.gy server:

Sent message to an inbox at bsky.brid.gy!

Response Status Code: 401

Response body: {

  "error": "Couldn't load https://tomcasavant.glitch.me/u/tom to verify signature"

}

I'm not sure if it's something we're missing on our end to point it to the signature or if it's an issue with the brid.gy server (https://github.com/snarfed/bridgy-fed)

snarfed commented 2 months ago

@TomCasavant when I fetch https://tomcasavant.glitch.me/u/tom with AS2 conneg, it returns Content-Type: application/json; charset=utf-8. That needs to be application/activity+json or application/ld+json; profile="https://www.w3.org/ns/activitystreams" for ActivityPub to work. https://www.w3.org/TR/activitypub/#server-to-server-interactions

TomCasavant commented 2 months ago

@TomCasavant when I fetch https://tomcasavant.glitch.me/u/tom with AS2 conneg, it returns Content-Type: application/json; charset=utf-8. That needs to be application/activity+json or application/ld+json; profile="https://www.w3.org/ns/activitystreams" for ActivityPub to work. https://www.w3.org/TR/activitypub/#server-to-server-interactions

Awesome, thanks! Just from testing it quickly I seem to be getting some 500 errors from bridgy-fed but it's probably something I messed up, I'll look into it this weekend

snarfed commented 2 months ago

Welcome! And 500s are always the server's fault; even if you're doing something wrong, it should return 4xx etc. I'm working through lots of BF bugs right now, hopefully I'll fix yours soon.

andypiper commented 2 months ago

Useful, thanks @snarfed - I've patched user.js in my forked copy of Postmarks to set this content type correctly now.