I've been working through the design for Federated map annotation, and a lot of fun things are coming up. In my original sketches, I included a box for disappearing messages. That should be fun to do.
Turns out, it only took about two hours to add into Emissary. I'm really happy about the way this works. Here's the code:
{do:"schedule-delete", hours:"6"}
You can enter the number of days, hours, minutes, or seconds -- and you it works with go templates, too, so this is also valid:
{do:"schedule-delete", hours:"{{data.deleteAfter}}"}
You just add this into an add/create action, and Emissary will schedule something in the background queue to delete the message when the time comes. And, as you'd hope, this also hooks into the ActivityPub outbox, so the rest of the network will also get notified that the original message has been deleted.
YES. All of the standard caveats about Federation apply. No, we can't guarantee that other servers will observe the delete request. So no, it's not perfect. But in many cases this *pretty good* solution should be *good enough*
As of this morning, I've already implemented this in the Atlas app, and will be on the lookout for other places where disappearing messages could be useful on the Fediverse :)
2 months ago
Hi, I'm Ben. I'm moving my most jargon-filled posts here because sometimes I talk to normies outside of the software developer world and I don't want to scare them away.
Maybe some day I'll add some permanent content to this site, but for now I really want to start ranting about today's debugging session.
5 months ago
Content Types on the Fediverse are a mess. Today I worked through an especially nasty (and undocumented) "gotcha" that was preventing Emissary from Federating with other servers.
Apparently, all of these are valid requests for an ActivityPub document, and each Fediverse app uses a slightly different accent on their incantations:
```
Accept: application/activity+json
Accept: application/activity+json; charset=utf-8
Accept: application/activity+json; random comments about your mom
Accept: application/ld+json; profile="https://www.w3.org/ns/activitystreams"
Accept: application/ld+json
Accept: application/activity+json, application/ld+json
Accept: application/activity+json, application/ld+json; profile="https://www.w3.org/ns/activitystreams"
Accept: application/json
```
Yes, I know: all of these *are* valid per the HTTP spec. That's on me. But every online tutorial glosses over the mess and pretends that everyone is out there using `application/activity+json` like Mr. Rogers holding a cup of chamomile and not whatever is actually going on up above like a pre-therapy Axl Rose signing "Get in The Ring" to a stadium of methed up raccoons.
The bottom line is this: don't trust that another server is going to send requests with sane arguments. Filter your inputs heavily and expect the absolute worst behavior from everyone and you won't be disappointed π
5 months ago
I'm working to troubleshoot an intermittent issues in getting #Emissary to Federate with specific versions of Mastodon.
If you're wondering how it's going, my last commit message was simply "Damnit, Mastodon..."
5 months ago
Loading recent posts...