Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • About Bonfire
django
django
@django@social.coop  ·  activity timestamp 4 days ago

ActivityPub client developer experience is something like this.

Building a coherent feed with stateful objects requires comparing an Activity from the inbox, with what’s in your outbox.

#ActivityPub #c2s #DevEx

Managing state with c2s

A woman riding a unicycle on a tightrope while juggling.
The pins are labelled Like, Announce, Follow, Following.

The ends of the tightrope are labelled Inbox and Outbox
Managing state with c2s A woman riding a unicycle on a tightrope while juggling. The pins are labelled Like, Announce, Follow, Following. The ends of the tightrope are labelled Inbox and Outbox
Managing state with c2s A woman riding a unicycle on a tightrope while juggling. The pins are labelled Like, Announce, Follow, Following. The ends of the tightrope are labelled Inbox and Outbox
  • Copy link
  • Flag this post
  • Block
django
django
@django@social.coop replied  ·  activity timestamp 4 days ago

Of course implementations may vary but the spec isn’t clear, so let’s improve this, yeah! https://github.com/swicg/activitypub-api/issues/52

  • Copy link
  • Flag this comment
  • Block
django
django
@django@social.coop replied  ·  activity timestamp 4 days ago

There isn’t anything that says my server should return the latest known state of a post, including my interactions with it.

And sure, I can refetch any activity from the inbox via proxyUrl (except non-public), but nothing guarantees my server will add the current remote state of a post to its internal representation and return this.

So this forces a thick client situation, to have what should be fairly standard User Experience.

  • Copy link
  • Flag this comment
  • Block
marius
marius
@mariusor@metalhead.club replied  ·  activity timestamp 4 days ago

> There isn’t anything that says my server should return the latest known state of a post, including my interactions with it.

@django yes there is. When a client fetches the ID of an object, be it activity or regular Note/Article/Image/etc you receive the "canonical version" of that object. All the interactions that were ever operated on that object should be reflected on its representation. I think you're overcomplicating things...

  • Copy link
  • Flag this comment
  • Block
django
django
@django@social.coop replied  ·  activity timestamp 3 days ago

@mariusor ok, and what if the remote server doesn’t expose a likes endpoint? (the server may just not support, or the actor hides it)

Or even if it does, you have to get the collection page to find your actor. And that’s just likes, now add Announces, Bookmarks, and the whole context and reply chain.

  • Copy link
  • Flag this comment
  • Block
django
django
@django@social.coop replied  ·  activity timestamp 3 days ago

@mariusor doing this for one lightly engaged with post, in a post view is probably fine.

But doing this for every post in a feed? I guess I’m arguing for my own server to be a bit more self aware of the actions I’ve taken, possibly inlining them.

  • Copy link
  • Flag this comment
  • Block
marius
marius
@mariusor@metalhead.club replied  ·  activity timestamp 3 days ago

@django sadly that's not how any of this works. ActivityPub offers what it offers. Different URLs for different things. My personal opinion is that as a client you need to access those ahead of time to fetch the data you need to build your model. And yes, you do it for every object.

  • Copy link
  • Flag this comment
  • Block

bonfire.social.coop

See https://wiki.social.coop and reach out to the TWG or CWG for more!

bonfire.social.coop: About · Code of conduct · Privacy ·
Bonfire social · 1.0.1 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Code of Conduct