• 3 Posts
  • 68 Comments
Joined 1 year ago
cake
Cake day: June 13th, 2023

help-circle







  • Gotcha. I had a feeling something around how Mastodon doesn’t support ActivityPub Groups (yet?) would be where things are going on. Congrats on piefed, by the way. I’ll start studying the codebase now as I’m keen to understand how server-to-server communication works more deeply than I do now. Sending Announce(?) and fetching stuff from other servers…

    When I look at the ActivityPub Note object (via curl -H 'Accept: application/activity+json https://hachyderm.io/@otl/111887721960075860) I see:

    {
        "@context": [
            "https://www.w3.org/ns/activitystreams",
            {
                "ostatus": "http://ostatus.org#",
                "atomUri": "ostatus:atomUri",
                "inReplyToAtomUri": "ostatus:inReplyToAtomUri",
                "conversation": "ostatus:conversation",
                "sensitive": "as:sensitive",
                "toot": "http://joinmastodon.org/ns#",
                "votersCount": "toot:votersCount"
            }
        ],
        "id": "https://hachyderm.io/users/otl/statuses/111887721960075860",
        "type": "Note",
        "summary": null,
        "inReplyTo": "https://ttrpg.network/comment/4965852",
        "published": "2024-02-07T01:59:08Z",
        "url": "https://hachyderm.io/@otl/111887721960075860",
        "attributedTo": "https://hachyderm.io/users/otl",
        "to": [
            "https://www.w3.org/ns/activitystreams#Public"
        ],
        "cc": [
            "https://hachyderm.io/users/otl/followers",
            "https://ttrpg.network/u/Neato",
            "https://lemmy.world/u/ForgottenFlux"
        ],
        "sensitive": false,
        "atomUri": "https://hachyderm.io/users/otl/statuses/111887721960075860",
        "inReplyToAtomUri": "https://ttrpg.network/comment/4965852",
        "conversation": "tag:hachyderm.io,2024-02-06:objectId=123754186:objectType=Conversation",
        "content": "<p><span class=\"h-card\" translate=\"no\"><a href=\"https://ttrpg.network/u/Neato\" class=\"u-url mention\">@<span>Neato</span></a></span> <span class=\"h-card\" translate=\"no\"><a href=\"https://lemmy.world/u/ForgottenFlux\" class=\"u-url mention\">@<span>ForgottenFlux</span></a></span>  I totally get how you feel. One use-case I think of is machine-generated image alt-text. These are often not added to images. But with image-to-text ML models, visually-impaired people could hear a descriptions of images that before were never annotated.</p>",
        "contentMap": {
            "en": "<p><span class=\"h-card\" translate=\"no\"><a href=\"https://ttrpg.network/u/Neato\" class=\"u-url mention\">@<span>Neato</span></a></span> <span class=\"h-card\" translate=\"no\"><a href=\"https://lemmy.world/u/ForgottenFlux\" class=\"u-url mention\">@<span>ForgottenFlux</span></a></span>  I totally get how you feel. One use-case I think of is machine-generated image alt-text. These are often not added to images. But with image-to-text ML models, visually-impaired people could hear a descriptions of images that before were never annotated.</p>"
        },
        "attachment": [],
        "tag": [
            {
                "type": "Mention",
                "href": "https://ttrpg.network/u/Neato",
                "name": "@[email protected]"
            },
            {
                "type": "Mention",
                "href": "https://lemmy.world/u/ForgottenFlux",
                "name": "@[email protected]"
            }
        ],
        "replies": {
            "id": "https://hachyderm.io/users/otl/statuses/111887721960075860/replies",
            "type": "Collection",
            "first": {
                "type": "CollectionPage",
                "next": "https://hachyderm.io/users/otl/statuses/111887721960075860/replies?only_other_accounts=true&page=true",
                "partOf": "https://hachyderm.io/users/otl/statuses/111887721960075860/replies",
                "items": []
            }
        }
    }
    

    So I’m assuming an Announce was posted to the shared inboxes at lemmy.ml, lemmy.world and ttrpg.network… hmm… I better start reading!






  • Oh wow thanks! :) One program syncs my home Mastodon timeline, with all replies, to a Maildir. Dovecot serves that over IMAP. Sending involves a custom SMTP server which reads the mail message and creates a post from it.

    For Mastodon it was all about converting statuses (toots? Posts?) into RFC 5322 messages. Using the status’ ID as Message-Id in the message header is handy. Mail clients do the heavy lifting of rendering threads thankfully!









  • Devil’s advocate: what about the posts and comments I’ve made via Lemmy? They could be presented as files (like email). I could read, write and remove them. I could edit my comments with Microsoft Word or ed. I could run some machine learning processing on all my comments in a Docker container using just a bind mount like you mentioned. I could back them up to Backblaze B2 or a USB drive with the same tools.

    But I can’t. They’re in a PostgreSQL database (which I can’t query), accessible via a HTTP API. I’ve actually written a Lemmy API client, then used that to make a read-only file system interface to Lemmy (https://pkg.go.dev/olowe.co/lemmy). Using that file system I’ve written an app to access Lemmy from a weird text editing environment I use (developed at least 30 years before Lemmy was even written!): https://lemmy.sdf.org/post/1035382

    More ideas if you’re interested at https://upspin.io