Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RSS Endpoints #82

Open
6 tasks
sgharms opened this issue Jan 16, 2023 · 4 comments
Open
6 tasks

RSS Endpoints #82

sgharms opened this issue Jan 16, 2023 · 4 comments

Comments

@sgharms
Copy link

sgharms commented Jan 16, 2023

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:

  • Add RSS display endpoint
    • Add rss endpoint route (Easy)
    • Find datasource for a given :name (Unknown)
    • Find latest n entries (probably 25?) (Medium)
    • Present the n entries as RSS items (Medium)
    • Present wrapped RSS items at endpoint

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
Copy link
Member

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:

guppe/index.js

Lines 103 to 104 in b8fddcd

app.route(routes.outbox)
.get(actorOnDemand, apex.net.outbox.get)

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
Copy link
Member

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
Copy link
Member

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
Copy link
Author

sgharms commented Jan 29, 2023

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants