GNU social FEDIVERSE Conversation Assembler Thing

This tool tries to assemble complete conversation trees from the URL of a single notice in a federated conversation. This is a no-frills utility at the moment, and you can't reply from here, but at least you'll be able to read the conversation without hopping from node to node. It mostly works!

**WARNING** I use some synchronous HTTP requests in this, which can make your browser unresponsive while waiting for slower nodes to return data. And some nodes are really slow. Like... tens of seconds slow. Soon, I'll fix that section of the code.

Known Bugs

  • Conversations may not update after you've viewed them once. This is not a problem with the script, it's a problem with the CORS proxy that is used, which may cache requests for 24 hours or some other damnably-long time. This script defaults to using http://cors-anywhere.herokuapp.com/, but if you're experiencing problems and want to use a different CORS proxy, enter its address here and try again:
  • Posts from Friendica, Pleroma, and otherwheres can dead-end the script.
—LÆMEUR
@laemeur@mastodon.sdf.org

How It Works

The extremely-short version:

  1. Look at a post's JSON representation to find the conversation ID on its server.
  2. Load the conversation's JSON Activity Streams representation and start making a collection of posts.
  3. Go through the posts and see if any of them are from other servers. If they are, go back to step 1 for a post from each of the different servers.
  4. Throw away duplicate posts we've collected from all the servers.
  5. Sort 'em by date.
  6. Render 'em as HTML
  7. Stick replies inside the container DIV of the note they reply to.
  8. Shoot lasers out of your ears!

This needs work. The JSON Activity Streams representation of conversations is missing some useful data in the activity objects. I'll probably change this to use the Atom representation in the future, which is a bit more complete.


Changelog:

G5M.1337 - Added a quick hack for "folding" the replies of messages.

G2S.1426 — Fixed another dumb error that caused some conversation fetches to loop out of control.

G2J.0197 — Fixed a pretty dumb error that caused the conversation to appear twice.

G2F.0197 — A little code cleanup, and some style changes. Image attachments show now - other attachments soon!

G2D.0203 — Page is now accessible at http://laemeur.sdf.org/gs/convo, and notice permalinks can be passed as query strings (see "TO USE:" above).

G2C.1430 — Long conversations are fixed. I'd forgotten to take into account that the JSON API only returns conversation items 20-per-page.

I81.0190 — Mastodon posts work now, as far as I've been able to tell. I copied and pasted a bunch of code from ÆGNUS and, to my surprise, it more-or-less worked. Have tested very little, though!