Discord embeds for Mastodon posts are getting a lot better! You should see better images and videos, better formatting, better context styling, and support for embedding a wider variety of posts. This is rolling out now, so you should see it start to take effect in the coming hours. Let me know if you run into any problems!
also yes I had to write an HTML-to-Markdown converter in Rust for this
Update: the new rich Discord embeds are now available for posts on a variety of other ActivityPub services, including Misskey, Pixelfed, and more! Embeds also now indicate when a post is a reply.
If you run an ActivityPub service and your links aren't getting rich embeds on Discord, it's *probably* because you're blocking our requests, but there's a chance you've uncovered a bug! If you think you have (or if you've found a post that gets a rich embed that's malformed in some way), reply here with details and I'll take a look.
@rcombs it doesn't work with akkoma still. :( restarted our client just to make sure it updated but these still look like the old embeds
@rcombs actually, they're just straight up still borked - they completely ignore line breaks
@loveshock this page doesn't have a <link rel="alternate" type="application/activity+json"> element, so I have no way to know that it's ActivityPub-compatible; please yell at your implementation’s devs to fix that
@rcombs @loveshock

>no way to know that it's AP-compatible

... about that https://github.com/snarfed/bridgy-fed/issues/374

(akkoma actually has its own cursed protocol that overlaps but not necessarily actually complies with activitypub)
support Akkoma · Issue #374 · snarfed/bridgy-fed

https://akkoma.social/

GitHub
@halva @loveshock idk if it'd be close enough if it included the link, but if it's *not* actually ActivityPub then, uh. they should probably advertise it under their own alternate content-type, I guess? and maybe *also* provide an application/activity+json link that's, uh. actually spec-compliant

@rcombs @halva @loveshock The media type `application/activity+json` signals an AS2 document, not necessarily a fediverse object, and not necessarily containing AP properties such as `likes` and `shares` collections ^_^

This isn't a matter of "spec compliance", because AS2 is more or less unstructured data once you get past the JSON(-LD). Anything can be included or not included.

Either way, Akkoma currently implements Mastodon API compatibility to a degree that it should be transparent here?

@halva @loveshock @rcombs

(akkoma actually has its own cursed protocol that overlaps but not necessarily actually complies with activitypub)

i’m not sure any commonly used activitypub software does, since activitypub is a massively overcomplicated protocol, and to federate with mastodon you have to emit specially formatted messages that don’t quite match any canonical form of activitypub messages

@rcombs @loveshock i added that link but it still doesn’t work

does the discord embed fetcher implement activitypub request signing?

@charlotte @loveshock what was the link URL?

it does not implement signing (and likely will not), but if the link points to a URL with path "/notice/[alphanumeric ID]" (as with the HTML pages), the unfurler should be able to recognize that and make request the post from the Mastodon-compatible API

@rcombs @loveshock i am linking to the ap object id so /activities/{uuid}, but yeah you can’t fetch it without request signing
@rcombs @loveshock ok now here’s the wtf moment: it returns the /notice/[id] link but only when you look at it in the browser while logged in?
@charlotte sounds fixable?
@rcombs yeah i found the problem now let’s see if the fix i wrote actually works
@rcombs hm, perhaps it needs an absolute link
@charlotte oh, congrats, you've found a bug on my end! relative URLs *should* work but don't (because nothing I tested against had them); I can fix that, but it'll probably be a few days before it's deployed, and using an absolute URL will work either way
@charlotte the fix for this should be rolled out now