Loading website...
lade...
random avatar

zain - Network

Posts Subscribe

Substack has been Mastodon’ed on Twitter

https://toot.io/@zain/1101602510...

Substack has been Mastodon’ed on Twitter

8.4.2023 00:00Substack has been Mastodon’ed on Twitter
https://toot.io/@zain/1101602510...

@nurettin@fosstodon.com here’s an example of what websockets with PyVibe could look like: https://websocket.pycob.app/

https://toot.io/@zain/1100694709...

@nurettin@fosstodon.com here’s an example of what websockets with PyVibe could look like: websocket.pycob.app/

22.3.2023 23:13@nurettin@fosstodon.com here’s an example of what websockets with PyVibe could look like: https://websocket.pycob.app/
https://toot.io/@zain/1100694709...

Is Santa real?

https://toot.io/@zain/1095711834...

Is Santa real?

24.12.2022 23:12Is Santa real?
https://toot.io/@zain/1095711834...

Hmm, looking at this thread, it seems like it’s possible that the go-fed/httpsig HTTP signatures might possibly not be compatible with...

https://toot.io/@zain/1095605804...

Hmm, looking at this thread, it seems like it’s possible that the go-fed/httpsig HTTP signatures might possibly not be compatible with Mastodon HTTP signatures.

socialhub.activitypub.rocks/t/

23.12.2022 02:16Hmm, looking at this thread, it seems like it’s possible that the go-fed/httpsig HTTP signatures might possibly not be compatible with...
https://toot.io/@zain/1095605804...

Oof… I spent all day trying to send a follow request to a Mastodon inbox and kept getting unauthorized errors. I went through several...

https://toot.io/@zain/1095605298...

Oof… I spent all day trying to send a follow request to a Mastodon inbox and kept getting unauthorized errors. I went through several iterations of Mastodon complaining and fixing:
- I didn’t send a message digest
- I didn’t send a signature
- The host needs to be signed
- The date needs to be signed
- The content type needs to be signed

Now I’m not getting any error message other than the HTTP 401 Unauthorized. 🤷🏽‍♂️

23.12.2022 02:03Oof… I spent all day trying to send a follow request to a Mastodon inbox and kept getting unauthorized errors. I went through several...
https://toot.io/@zain/1095605298...

I tried to send a Follow request to my toot.io inbox and it returns a “Request not signed” error so I’ll have to look into how to sign...

https://toot.io/@zain/1095580464...

I tried to send a Follow request to my toot.io inbox and it returns a “Request not signed” error so I’ll have to look into how to sign a request. This makes sense. Everything we’ve done so far has been non-mutating. There’s probably some public-key/private-key dance that we have to do to verify that requests are actually coming from the server and user making the follow request.

22.12.2022 15:32I tried to send a Follow request to my toot.io inbox and it returns a “Request not signed” error so I’ll have to look into how to sign...
https://toot.io/@zain/1095580464...

At this point I have to say that my goal is to make my site work with Mastodon so I’m glad that I’m going down the path of figuring out...

https://toot.io/@zain/1095578887...

At this point I have to say that my goal is to make my site work with Mastodon so I’m glad that I’m going down the path of figuring out how *Mastodon* works rather than doing it from the ground-up from the ActivityPub specification because I would have gone down so many rabbit holes.

22.12.2022 14:51At this point I have to say that my goal is to make my site work with Mastodon so I’m glad that I’m going down the path of figuring out...
https://toot.io/@zain/1095578887...

I found a good resource for the difference between #ActivityPub and #Mastodon https://activitypub.rocks/implementation-report/So the next up...

https://toot.io/@zain/1095578809...

I found a good resource for the difference between and
activitypub.rocks/implementati

So the next up is the inbox. The inbox “accepts” various activities and I must admit that I was confused for a bit because it accepts an “Accept” action as part of it’s “vocabulary”

So this is what the spec says about “Follow”
w3.org/TR/activitystreams-voca

Mastodon specified an “actor” “using an indirect Link” so let’s do that.

22.12.2022 14:49I found a good resource for the difference between #ActivityPub and #Mastodon https://activitypub.rocks/implementation-report/So the next up...
https://toot.io/@zain/1095578809...

Implementing the outbox endpoint gets us the post count in the profile and probably the list of posts that show up under the user but I set...

https://toot.io/@zain/1095559280...

Implementing the outbox endpoint gets us the post count in the profile and probably the list of posts that show up under the user but I set that to empty for now so nothing shows up there.

22.12.2022 06:33Implementing the outbox endpoint gets us the post count in the profile and probably the list of posts that show up under the user but I set...
https://toot.io/@zain/1095559280...

So at this point, when I pull up a profile, the server is asking for outbox, following, followers, featured, and featuredTags. The only one...

https://toot.io/@zain/1095558286...

So at this point, when I pull up a profile, the server is asking for outbox, following, followers, featured, and featuredTags. The only one of these that’s not implemented yet is the outbox.

I’ve realized that earlier, the “inbox” request was actually from hitting the “Follow” button. We’ll deal with outbox first to complete the profile requests and then we’ll deal with the inbox.

22.12.2022 06:07So at this point, when I pull up a profile, the server is asking for outbox, following, followers, featured, and featuredTags. The only one...
https://toot.io/@zain/1095558286...

It works! The following and followers count now show up on the profile.

https://toot.io/@zain/1095558086...

It works! The following and followers count now show up on the profile.

22.12.2022 06:02It works! The following and followers count now show up on the profile.
https://toot.io/@zain/1095558086...

/collections/featured appears to be the “pinned” posts on a profile. I’ll just return an empty array alongside all the extra...

https://toot.io/@zain/1095557850...

/collections/featured appears to be the “pinned” posts on a profile. I’ll just return an empty array alongside all the extra metadata.

/collections/featuredTags seems to return a Not Found error for every user that I’ve tried it on. I’ll come back to that later if it’s important. For now I’m going to have my server return the same Not Found error.

22.12.2022 05:56/collections/featured appears to be the “pinned” posts on a profile. I’ll just return an empty array alongside all the extra...
https://toot.io/@zain/1095557850...

“followers” is exactly the same — I copied and pasted from “following”, which… ugh. I’ll have to come back later and clean up.

https://toot.io/@zain/1095557065...

“followers” is exactly the same — I copied and pasted from “following”, which… ugh. I’ll have to come back later and clean up.

22.12.2022 05:36“followers” is exactly the same — I copied and pasted from “following”, which… ugh. I’ll have to come back later and clean up.
https://toot.io/@zain/1095557065...

First up is “following” — that just returns the number of users that the specified user is following plus a link to the “first”...

https://toot.io/@zain/1095556977...

First up is “following” — that just returns the number of users that the specified user is following plus a link to the “first” page where the server can get the list of followers.

22.12.2022 05:34First up is “following” — that just returns the number of users that the specified user is following plus a link to the “first”...
https://toot.io/@zain/1095556977...

Clicking on the “Follow” button doesn’t appear to have sent any additional requests to the server but that’s probably because that...

https://toot.io/@zain/1095554446...

Clicking on the “Follow” button doesn’t appear to have sent any additional requests to the server but that’s probably because that behavior is defined in one of these other unimplemented endpoints that Mastodon requested:

I also just realized that I misspelled collections… twice 🤦‍♂️ . My guess is that following, followers, featured, and featuredTags will all be arrays of some sort and I can probably just return empty arrays for those as a stub implementation so I’ll do that next.

22.12.2022 04:30Clicking on the “Follow” button doesn’t appear to have sent any additional requests to the server but that’s probably because that...
https://toot.io/@zain/1095554446...

And we have our first liftoff! User profile shows up in Mastodon!Let’s see what happens when we click the “Follow” button.

https://toot.io/@zain/1095554170...

And we have our first liftoff! User profile shows up in Mastodon!

Let’s see what happens when we click the “Follow” button.

22.12.2022 04:23And we have our first liftoff! User profile shows up in Mastodon!Let’s see what happens when we click the “Follow” button.
https://toot.io/@zain/1095554170...

That’s a lot of stuff, but I implemented stubs for the user response.

https://toot.io/@zain/1095554089...

That’s a lot of stuff, but I implemented stubs for the user response.

22.12.2022 04:21That’s a lot of stuff, but I implemented stubs for the user response.
https://toot.io/@zain/1095554089...

Ah ha! So the request from the Mastodon server gets sent with a header of Accept:[application/activity+json, application/ld+json]. Adding...

https://toot.io/@zain/1095538795...

Ah ha! So the request from the Mastodon server gets sent with a header of Accept:[application/activity+json, application/ld+json]. Adding this header changes the response from HTML to JSON:

21.12.2022 21:52Ah ha! So the request from the Mastodon server gets sent with a header of Accept:[application/activity+json, application/ld+json]. Adding...
https://toot.io/@zain/1095538795...

Now this looks a little weird to me. So this endpoint (/users/{username}) is an html page. That feels like unnecessary indirection — I...

https://toot.io/@zain/1095536838...

Now this looks a little weird to me. So this endpoint (/users/{username}) is an html page. That feels like unnecessary indirection — I would have assumed that we’d be hitting a JSON api endpoint. So either this page responds differently to the Mastodon user agent or one of the meta tags has some information about the next hop.

21.12.2022 21:02Now this looks a little weird to me. So this endpoint (/users/{username}) is an html page. That feels like unnecessary indirection — I...
https://toot.io/@zain/1095536838...

Now that we’ve implemented webfinger, we’re now getting GET /users/{username} requests so we’ll implement that next

https://toot.io/@zain/1095535687...

Now that we’ve implemented webfinger, we’re now getting GET /users/{username} requests so we’ll implement that next

21.12.2022 20:33Now that we’ve implemented webfinger, we’re now getting GET /users/{username} requests so we’ll implement that next
https://toot.io/@zain/1095535687...
Subscribe
To add news/posts to your profile here, you must add a link to a RSS-Feed to your webfinger. One example how you can do this is to join Fediverse City.
         
Webfan Website Badge
Nutzungsbedingungen   Datenschutzerklärung  Impressum
Webfan | @Web pages | Fediverse Members

⬆️

⬇️