Skip to content
This repository has been archived by the owner on Mar 30, 2023. It is now read-only.

Build an all reply fetcher #9

Open
HelgeKrueger opened this issue Mar 12, 2023 · 0 comments
Open

Build an all reply fetcher #9

HelgeKrueger opened this issue Mar 12, 2023 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@HelgeKrueger
Copy link
Owner

A common complaint about the FediVerse are missing replies. Here is how to implement a "reply fetcher" in an ActivityPub Client. Usage will require a server supporting ActivityPub Client 2 Server.

Implementation Strategy

Here's how to implement this:

from bovine.activitypub import actor_from_file
actor = actor_from_file('you.toml', aiohttp.ClientSession())

# the following is awkward and should be fixed
response = await actor.proxy_element(original_url)
element = json.loads(await response.text)

The element then has a replies collection. Fetch it ... getting it with actor.get_ordered_collection might be currently possible. As the credentials used to connect to the Bovine ActivityPub Server are the same as used to other hosts. However, it would be cleaner to also proxy the elements.

Then repeat this for all the replies.

Once this is done build a display. It might be possible to reuse Buffalo in particular:
https://codeberg.org/helge/Buffalo/src/branch/main/src/components/timeline/DisplayConversation.js

@HelgeKrueger HelgeKrueger added the help wanted Extra attention is needed label Mar 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant