Fediverse issues with posts to Mastodon

Hello,

I’m working on configurations for my new Write.as account. I’m testing federated posts. They work pretty amazing overall, but I have a couple issues I was hoping someone could help with. One is a bug and one is a question (or a suggestion if it’s not currently possible).

Bug

My hashtags are converted to lowercase. Pascal case hashtags are important for accessibility, so this is kind of a big issue for me. I wrote a piece on this that went viral on Medium, Mastodon, and LinkedIn. It’s important to lots of folks beyond me. Is there any way we can preserve hashtag case when posting to Mastodon?

The second part of this is that hashtags only appear if there’s an image in my Write.as post. When there isn’t an image the hashtag isn’t posted to the fediverse.

Question/suggestion

I’m wondering if there’s a way to manage what data is posted to the fediverse. When I don’t have an image in my Write.as post, a link preview card on Mastodon is shown because there’s no image in the post. When I do include an image in my Write.as post, there’s no link preview because the image is present.

This is expected default Mastodon behavior. However, only the title of my test Write.as post is included in the text portion of the Mastodon post. So the only way for there to be any sort of preview is when there’s no image, because the link preview cards show the first portion of the post body from Write.as.

Ideally we’d send the first X number of characters or something from Write.as, so there’s at least some synopsis in place. A title isn’t really enough to provide an overview of the piece being linked to. If that’s not possible, it’s not the end of the world. But it would be great to see.

Is anyone able to help with this? Thanks in advance.

Thanks for bringing all of this up! Unfortunately, I think most of this involves how Mastodon handles our content. I’ll go through each point:

I’ll have to check with the Mastodon team to see what might be causing this. Right now, the actual data we send out to the fediverse appears to be correct – each post with tags contains something like this:

...
"tag":[
   {
      "type":"Hashtag",
      "href":"https://matt.writefreely.dev/tag:test",
      "name":"#test"
   },
   {
      "type":"Hashtag",
      "href":"https://matt.writefreely.dev/tag:aGreatTest",
      "name":"#aGreatTest"
   },
   {
      "type":"Hashtag",
      "href":"https://matt.writefreely.dev/tag:Testing",
      "name":"#Testing"
   }
]
...

I’ll report back once I have more info and/or a fix.

I believe this is purely related to Mastodon’s UI. Again all tag data is sent out with every single post, so they’ll always show up in hashtag searches on Masto, and different fedi platforms can display them however they please. But we don’t have much more control over how / when hashtags show up on Mastodon.

This is a little tricky with how we’re set up right now. All Write.as images are included in the ActivityPub data as “attachments,” just like they would be for a microblog / Mastodon post, so Mastodon displays them just the same. This setup probably makes more sense when a blog post contains several images, so we might need to change this – but I think this needs more discussion.

Unfortunately this is due to how Mastodon handles the Article content type that we send out. Internally (last I heard), they take out the title and URL, then convert the post to the Note type that they use, meaning only those pieces of data ultimately show up on Mastodon. (Though some Mastodon forks, like Hometown, display Articles in their entirety.)

Generally, Article support is pretty poor across the fediverse right now (and has been since we started federating in 2018). But there are some promising developments happening, between Ghost adopting ActivityPub and Mastodon finally taking an interest in supporting the Article content type. But for now, barring any major revamps on our end, we’re probably stuck with this.

An update on lowercase hashtags: this appears to be on Mastodon’s side, too.

The first time your Masto instance sees a hashtag, it stores the exact casing used in that tag. Then admins can always change the casing of it to their liking. But no matter what, the hashtags in that bar on Mastodon will always display casing according to what is stored on your instance.

Okay, thanks for all of this, Matt. It sounds like it’s just a little tricky with the conversation between Write.as, the fediverse API, and how Mastodon handles it. I get it.

The automated fediverse profile/publishing are kind of a bonus for me. So none of this is mission critical. But it would be cool to see it behave.

In a perfect world, a post would contain:

  • Title
  • Synopsis
  • Link
  • Case-sensitive hashtags

At least we have the connection and things are functional.