Comment on Introducing New Fediverse Software, Goofed v0.0.1, Minimum Viable Shitpost Edition
admin@scrapetacular.ydns.eu 3 days agoWhoa senpai noticed me. There actually is a recursive query format in the latest sqlite for this exact situation, Postgres may have something similar, I just thought a list is fine for the web UI. I’ll have to benchmaxx and pick a strategy for the API.
I actually read that FEP. In my code that is too shameful to release yet, I look for an Object, then look for its Type, then figure out how to deserialize the rest of the object, but this object doesn’t have one. Would it be possible to do something like this:
{
"object": {
"type": "LikeCollection",
"likes": [like1, like2, ..etc]
}
}
Or is that weird. Spare a thought for those in less dynamic languages :D
rimu@piefed.social 3 days ago
You’re right, to be more similar to the ActivityPub style of doing things the object should be a “type” of “Collection”, not just suddenly be an array instead of an object.
admin@scrapetacular.ydns.eu 2 days ago
How do you know if a random server implements a particular FEP?
rimu@piefed.social 2 days ago
There is a convention of putting a FEDERATION.md file in the root of your project (there is a FEP about it but I can’t remember what it is, heh) which lists the FEPs your project implements.
e.g. https://codeberg.org/rimu/pyfedi/src/branch/main/FEDERATION.md
There is no standardised API endpoint for discovering this info so basically you just need to lurk in all the dev spaces you can and watch what they’re talking about, stalk each other’s codeberg/github issue queues and PRs and just cope with the jank.
admin@scrapetacular.ydns.eu 1 day ago
Excellent 👍
admin@scrapetacular.ydns.eu 3 days ago
Shit, that went well, I was expecting pushback. Should I make an issue for discussion, or is there one already. I don’t know if the object also needs an ID
rimu@piefed.social 3 days ago
There is a discussion but it’s an email chain between myself, Lemmy, Mbin, NodeBB so not really out in the open.
I’m thinking of using the normal OrderedCollection structure that AP has - https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollection. An object of type ’OrderedCollection’ with an array of ‘items’.
admin@scrapetacular.ydns.eu 2 days ago
I think so? I guess a Like has to happen before an Unlike, would the collection have multiple possible activity types in it?
While I have your ear, I don’t know how yet but I’d like it to be easier for devs to collaborate over AP for anything not involving security.