immers-space / guppe

Federated social groups with ActivityPub, NodeJS, Express, and Mongodb
https://a.gup.pe
GNU Affero General Public License v3.0
192 stars 16 forks source link

RSS Endpoints #82

Open sgharms opened 1 year ago

sgharms commented 1 year ago

ISSUE: I'm getting overwhelmed by my Guppe replies. And it seems like every day I find out about another. However, these are (generally) high-volume, low urgency, low importance. I'd like for them not to end up in my "feed" (a bad UI metaphor IMHO for Mastodon anyhow), but in an RSS-based topic inbox.

SOLUTION: Don't follow the Guppe, but target its RSS endpoint with a sufficiently clever RSS reader.

CONFLICT: Per #25, it seems like this is not supported, and the call for a pull request suggests it's non-trivial to implement.

NEXT STEP: I'd like to suggest that this issue be a place to scope out the work.

PRELIMINARY WORK ON MY PART: I cloned the code and, looking through, I don't see any mention of any RSS components. Also, based on the contents of router.js (I'm new to Vue but am using my Ember and React eyeballs to read it), I don't see any place to hook into the actual content the various Guppe accounts have re-sent. So my punch list of tasks to goal would be:

STEPS:

So I think all of this is pretty tractable, but the one part that I don't know where to start would be the data source. Do we have that? Where is the canonical holder of that information. Noting the funding discussions, I'm gathering that the costs that are scaling up on Guppe are related to the machine(s) holding these data. Is there documentation / code on how to access said data. Past that, provided my list above holds, I think it's a matter of doing the transformation and presentation (I'm open to being wildly off in my estimation here as well though 😳).

wmurphyrd commented 1 year ago

Rather than router.js, look at https://github.com/immers-space/guppe/blob/main/index.js. The former is just the front-end SPA handling; the latter is the server where you can add endpoints.

Here's the ActivityPub endpoint for fetching group content: https://github.com/immers-space/guppe/blob/b8fddcd55a758519397a352a4c6c8552ccd5d7d6/index.js#L103-L104

You'll find there's not much in this file because Guppe is powered by a library for ActivityPub apps: https://github.com/immers-space/activitypub-express

Inside apex.net.outbox.get is this:

[
      validators.jsonld,
      validators.targetActor,
      security.verifyAuthorization,
      collection.outbox,
      responders.result
]

You'll want to make a route that uses the same sequence of middlewares (available under apex.net from index.js) except replace responders.result with a different express middleware that takes res.locals.apex.result and sends it in the correct format for rss and also, before collection.outbox, add another middleware to set req.query.page = true so that you get the the collection orderedItems instead of just the collection metadata.

wmurphyrd commented 1 year ago

Please let me know if you are committed to investing time in this. Guppe is now managed as a cooperative via https://opencollective.com/guppe-groups, so I'll need to put the feature up for a vote with the members

wmurphyrd commented 1 year ago

Also please note that #54 is potentially a simpler path to get the desired outcome of not having your home timeline flooded by Guppe replies

Or also consider the Exclusive Lists feature of the Hometown Mastodon fork, which would let you take Guppe Groups out of your home feed and into a separate feed with all the posts and replies still intact

sgharms commented 1 year ago

@wmurphyrd I'm not able to make a commitment at this point. I need to get a better sense on where my skills are wrt implementing this feature so that I can size my ability to address it. If I think I have a good grasp and have dedicated time I'll go through the process.