this post was submitted on 06 Mar 2024
212 points (97.7% liked)

Fediverse

28499 readers
312 users here now

A community to talk about the Fediverse and all it's related services using ActivityPub (Mastodon, Lemmy, KBin, etc).

If you wanted to get help with moderating your own community then head over to !moderators@lemmy.world!

Rules

Learn more at these websites: Join The Fediverse Wiki, Fediverse.info, Wikipedia Page, The Federation Info (Stats), FediDB (Stats), Sub Rehab (Reddit Migration), Search Lemmy

founded 2 years ago
MODERATORS
 

What have I done?! My abomination of an idea of bridging my email and ActivityPub progresses. If you see this message, something is working! Comments replies are welcome as it's a good test of this system :)

People keep saying ActivityPub is a lot like email. If it's so similar to email, could I use my email client to interact with the fediverse?

Previously I did this by writing a SMTP interface to the Mastodon HTTP API. That worked. But as we probably know, the fediverse is not Mastodon; it's really ActivityPub. The real deal would be working with ActivityPub directly, not the Mastodon HTTP API.

And that's now (mostly?) working! In shonky diagram form, sending looks like this:

laptop --SMTP--> my_server --ActivityPub--> fediverse

Replies look like this:

fediverse --ActivityPub--> my_server --SMTP--> mailbox <--IMAP-- laptop

my_server translates back and forth between ActivityPub messages and mail messages.

For example given the message:

Date: Wed, 6 Mar 2024 16:37:59 +1100
From: Oliver Lowe <otl@apubtest2.srcbeat.com>
To: localtesting@aussie.zone
Subject: test 2

test hello world!

The following ActivityPub message is created:

{
	"@context": "https://www.w3.org/ns/activitystreams",
	"id":"https://apubtest2.srcbeat.com/outbox/1709703480070628170",
	"type":"Note",
	"name":"test 2",
	"to": ["https://aussie.zone/c/localtesting","https://www.w3.org/ns/activitystreams#Public"],
	"cc": ["https://aussie.zone/c/localtesting"],
	"published":"2024-03-06T16:37:59+11:00",
	"attributedTo":"https://apubtest2.srcbeat.com/actor.json",
	"content":"test hello world!",
	"mediaType":"text/markdown"
}

There's still a lot of bugs (of course) and unimplemented bits (of course). I can't call this a proper fediverse service yet. I'm going to roll with this for a bit and see how it holds up.

you are viewing a single comment's thread
view the rest of the comments
[–] Kolanaki@yiffit.net 1 points 8 months ago (1 children)

So this comment I am writing is going to appear as an email in a chain? Neat!

[–] otl@apubtest2.srcbeat.com 1 points 8 months ago (1 children)

So this comment I am writing is going to appear as an email in a chain? Neat!

Yep, that's what it looks like at my end!

[–] ibt3321@lemmy.blahaj.zone 1 points 8 months ago (1 children)

This comment has a timestamp in the future. It says "in 8 hours" for me.

[–] otl@apubtest2.srcbeat.com 2 points 8 months ago (1 children)

Oh huh. Good spotting.

After some quick digging... seems like a bug in the Lemmy web UI. I think= it's assuming the timestamp is always UTC. Are you using the UI at https= ://lemmy.blahaj.zone ?

The timestamp of the source message is has the UTC+11 timezone (where I a= m): https://apubtest2.srcbeat.com/otl/outbox/1709878623152651007 And I no= tice that in the old-Reddit-like interface at https://old.lemmy.world/com= ment/8236475 it renders as a time in the past.

[–] ibt3321@lemmy.blahaj.zone 1 points 8 months ago

It's only on the blahaj.zone web UI. Lemmy.world has a newer version.