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.
with the latest rollout, all known issues with the new discord embeds for mastodon posts are resolved, so if you encounter something that embeds poorly, please tell me about it!
Update: Discord now displays alt text on images in Mastodon embeds!
A Discord issue that caused posts on some Pleroma instances to use legacy embeds has been resolved.

@rcombs hi ^_^ it seems there's a small display bug with how replies from mastodon instances are formatted sometimes. the account to which i am replying is shown as a string of markdown instead of a link.

i think it's because when the display_name field is empty, you are supposed to use the username field instead.

the post is https://deadinsi.de/@miyuko/114313884626966233

miyuko (@[email protected])

@[email protected] set browser.urlbar.showSearchTerms.enabled to false

Serenity Laboratories
@miyuko thanks! the problem is that the username comes back as an empty string (which isn't handled) instead of null (which is). fix implemented; will roll out at some point
@rcombs thanks for looking into this!
@rcombs
omg thank you so much you're my hero

@rcombs I'd been meaning to ask, is this working on mobile for android yet? it seems fine on my desktop client when I just tested it, but on mobile it's not showing up yet

on my gf's iphone, it shows up too!

but on my android phone (pixel 7, latest stable android, latest discord stable) and my friend's (android 14, idk what phone, latest discord stable), it doesn't seem to

@rcombs Is there anything you can do when linking Lemmy comments, such as https://awful.systems/comment/6863929 ? Right now Discord embeds the first post, not the comment that was linked.
Stubsack: weekly thread for sneers not worth an entire post, week ending 6th April 2025 - awful.systems

Need to let loose a primal scream without collecting footnotes first? Have a sneer percolating in your system but not enough time/energy to make a whole post about it? Go forth and be mid: Welcome to the Stubsack, your first port of call for learning fresh Awful you’ll near-instantly regret. Any awful.systems sub may be subsneered in this subthread, techtakes or no. If your sneer seems higher quality than you thought, feel free to cut’n’paste it into its own post — there’s no quota for posting and the bar really isn’t that high. > The post Xitter web has spawned soo many “esoteric” right wing freaks, but there’s no appropriate sneer-space for them. I’m talking redscare-ish, reality challenged “culture critics” who write about everything but understand nothing. I’m talking about reply-guys who make the same 6 tweets about the same 3 subjects. They’re inescapable at this point, yet I don’t see them mocked (as much as they should be) > > Like, there was one dude a while back who insisted that women couldn’t be surgeons because they didn’t believe in the moon or in stars? I think each and every one of these guys is uniquely fucked up and if I can’t escape them, I would love to sneer at them. (Credit and/or blame to David Gerard for starting this. Also, happy April Fool’s in advance.)

@jernej__s that's entirely on their end; the metadata the server sends doesn't include any information on comments whatsoever
@rcombs Here's a regression: it looks like embeds don't show poll choices any more (eg. https://meow.social/@TerrorBite/114346801943008859).
TerrorBite 🦁 (@[email protected])

Which is more terrifying [ ] why do I hear boss music [ ] why do I hear bagpipes

meow.social - the meowstodon instance for creatures fluffy, scaly and otherwise
@rcombs could this also be provided for webhooks? i have a discord bot that does something like this and would like to utilize it (relevant github discussion: https://github.com/discord/discord-api-docs/discussions/3295)
Image embed alt-text support · discord discord-api-docs · Discussion #3295

Description Feature request: add an alt_text? parameter to the Embed Image Structure. Copy the text of this parameter to the HTML img alt attribute of the embedded image. Currently, images included...

GitHub
@Erika protip: set ?with_components=true in your query string, and set 0x8000 in the flags field 👀

@rcombs I think at some point you mentioned you were going to hide cw'd text behind a spoiler? that doesn't seem to be happening

(really appreciate your work on this! it's a massive improvement)

@Gaelan I considered it, but it doesn't work for images (the usual main use-case for marking content as sensitive); ultimately we're treating sensitive mastodon posts the same as sensitive posts on any other service (ie the sharing user can obscure them using ||spoiler tags|| if they find it appropriate for their community)
@rcombs fair - it’s mildly surprising and I imagine will catch some people out, but once they learn how it works it’ll be fine
@Gaelan yeah, it's an unfortunate surprise for people who were used to the old behavior, but it should be a one-time thing, and ultimately it's in line with what happens for eg links to sensitive-tagged posts on bluesky

@rcombs @Gaelan Hey, Discord embeds look very shiny now, thank you for that!

My only issue is the fact that it does indeed ignore content warnings now. I talk about shows a lot and I don't want it to blast spoilers into my Discord. Is there a work-around or is this just the way it is now?

@Radgryd @Gaelan Yeah, this was the team's decision on how to handle sensitive-flagged posts. It brings mastodon posts into alignment with the handling for other sites, and makes a bit more sense for chat-embed usage. On discord, embeds exist in channels (with their own community, context, and moderation), rather than when boosted onto people's general-purpose timelines (where users have ways to configure filters on an individual basis)

Users who want to obscure the content of an embed can wrap the link in ||pipes|| (put a space after the link if you want to have it still embed, but behind a spoiler block), which applies to links from any site

@rcombs @Gaelan That's unfortunate. I've felt the Fediverse was CW-sensitive more than other platforms, which I've enjoyed.

I let my feed be posted on my Discord via an RSS bot, so I have no control over spoilering the link/embed itself.

The embed ignores Mastodon's spoiler feature as well. I don't really know what the solution for this is.

@Radgryd I'm confused; as far as I can tell, this isn't a feature Mastodon has? That post just contains the plaintext string "||Test||", which doesn't have any special meaning in a Mastodon post.

As for solutions to your issue, I'd suggest using a bot that makes smarter decisions about what posts to forward where, or whether to obscure the embeds, based on the content of the post.

@rcombs I input the spoiler tags for Discord to see how it would display in the embed posted on Discord, of course it doesn't do anything on Mastodon..

It *did* use to obscure the embeds, as shown before. Thanks anyway.

Post by domi (networking witch), @[email protected]

and now, for something completely different: Bad Apple playing through a Traceroute new blogpost: https://sdomi.pl/weblog/24-arpa-hacks/

1.6.0.0.8.0.0.b.e.d.0.a.2.ip6.arpa
@rcombs does this make video embeds for misskey work? Or is that on our side of things, I can't remember (I maintain Sharkey)
@rcombs I can almost guarantee nobody tested it with Gush!, but it looks great! 👍
Ridley @ WATCH LYCORECO (@[email protected])

2.77K Posts, 47 Following, 840 Followers · She/her. SWE at Discord. Why would you think the views expressed here _weren't_ my own? searchable

Treehouse Mastodon
@Tak I indeed did not! and protip, add a <link rel=icon> to a PNG to get the site icon :)
@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
@rcombs do you plan to include a Signature header? the lack of one when requesting the activitypub representation will significantly hurt interoperability
@leo nope; turns out that the current setup (where we try to hit either the Mastodon API or an application/activity+json link) covers the vast majority of target cases without requiring the unfurler service to also itself be an ActivityPub server on the public internet (or share key pairs with one), which would be a bigger lift than I'm able to justify for the small remainder of cases
@rcombs hmm, i'm pretty sure a minimal compliant implementation could just be a single static JSON file. i was thinking about making a rust crate for read-only signed activitypub requests
@rcombs damn... tried it with iceshrimp.net and it doesn't work 😔
Iceshrimp.NET

This repository contains our efforts to continue the Iceshrimp project's legacy - in the form of an entirely new codebase, with a focus on performance, stability and maintainability.

Iceshrimp development
@EeveeEuphoria WFM on at least one instance; got a link to a specific post that doesn't work?
@rcombs dont worry a few years ago i wrote a rust markdown to tumblr json markup compiler
@rcombs thank u for ur service 🫡🦀
@rcombs
hell yeah, thank you!
@rcombs how well does this work with non-masto fedi software (*key, iceshrimp.net, akkoma etc)
@oli @rcombs this is probably implemented by mastodon the software not discord (hopefully)
@oli @rcombs i tried and it unfortunately only works with mastodon; probably due to discord detecting it