jan

@jan@jan.boddez.net

Mechanical engineer, amateur web developer, mediocre guitarist. Likes web standards, accessibility, PHP—Laravel and WordPress, mostly—the IndieWeb, and punk rock.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

pfefferle, (edited ) to fediverse German
@pfefferle@notiz.blog avatar

It’s a Thing!

Das Fediverse tut sich schwer, das volle Potential der verschiedenen Activity-Objects auszunutzen, hauptsächlich aus Angst, sie falsch oder schlecht darzustellen und deshalb teilen die meisten großen Netzwerke leider nur Notes.

Dabei könnte es so einfach sein!

@deadsuperhero schreibt auf seinem Blog, dass er eigentlich gerne Articles veröffentlichen will, aber (hauptsächlich) durch Mastodon zu Note gezwungen wird, wenn er sicher gehen will, dass der Text vollständig dargestellt wird.

Here’s the problem, though: the biggest player in the space, Mastodon, does a poor job of supporting Article. Instead, every post Mastodon uses is instead a Note. From a semantic point of view, it might not seem like there’s a lot of difference between the two: both are effectively texts posts that can contain some formatting markup, both can hold an arbitrary amount of characters, and both can effectively be used to represent a full article.

A Content-Fallback Mechanism for the Fediverse

Ironischerweise zeigt Mastodon eine föderierte Note vollständig an, auch wenn der Text weit über die eigentlich erlaubten 500 Zeichen hinaus geht, bei einem Article wird statt dessen aber nur die kurze summary benutzt.

Seine Idee: Ein Content-Fallback Mechanismus!

Das heißt jede Aktivität, egal von welchem Typ, liefert zusätzlich zu dem spezifischen Objekt, eine standardisierte Note (content-fallback):

<span><code class="hljs language-json">{  <span class="hljs-attr">"@context"</span>:[    <span class="hljs-string">"https://www.w3.org/ns/activitystreams"</span>,    {      <span class="hljs-attr">"Hashtag"</span>:<span class="hljs-string">"as:Hashtag"</span>    }  ],  <span class="hljs-attr">"id"</span>:<span class="hljs-string">"https://wedistribute.org/2024/04/iftas-dsa-guide/"</span>,  <span class="hljs-attr">"type"</span>:<span class="hljs-string">"Article"</span>,  <span class="hljs-attr">"content-fallback"</span>: {    <span class="hljs-attr">"content"</span>:<span class="hljs-string">"IFTAS, the dedicated Trust & Safety organization ..."</span>,    <span class="hljs-attr">"mediaType"</span>:<span class="hljs-string">"text/plain"</span>,    <span class="hljs-attr">"summary"</span>:<span class="hljs-string">""</span>,    <span class="hljs-attr">"tag"</span>:[{      <span class="hljs-attr">"href"</span>:<span class="hljs-string">"https://wedistribute.org/tags/fediverse"</span>,      <span class="hljs-attr">"name"</span>:<span class="hljs-string">"#fediverse"</span>,      <span class="hljs-attr">"type"</span>:<span class="hljs-string">"Hashtag"</span>    }],    <span class="hljs-attr">"type"</span>:<span class="hljs-string">"Note"</span>,    <span class="hljs-attr">"updated"</span>:<span class="hljs-string">"2024-04-11T20:55:29Z"</span>  }}</code></span><small class="shcb-language" id="shcb-language-1"><span class="shcb-language__label">Code-Sprache:</span> <span class="shcb-language__name">JSON / JSON mit Kommentaren</span> <span class="shcb-language__paren">(</span><span class="shcb-language__slug">json</span><span class="shcb-language__paren">)</span></small>

Ich verstehe das Problem und finde die Idee generell nicht schlecht, aber eigentlich bietet ActivityPub alles Nötige schon von Haus aus! ActivityPub oder besser ActivityStreams ist so aufgebaut, dass alle Objekte von einem Art Base-Object abgeleitet werden. Das heißt Article, Note, Event oder Place, haben ein gleiches Minimal-Set an Attributen:

  • <a href="https://www.w3.org/TR/activitystreams-vocabulary/#dfn-attachment">attachment</a>
  • <a href="https://www.w3.org/TR/activitystreams-vocabulary/#dfn-attributedto">attributedTo</a>
  • <a href="https://www.w3.org/TR/activitystreams-vocabulary/#dfn-audience">audience</a>
  • <a href="https://www.w3.org/TR/activitystreams-vocabulary/#dfn-content">content</a>
  • <a href="https://www.w3.org/TR/activitystreams-vocabulary/#dfn-context">context</a>
  • <a href="https://www.w3.org/TR/activitystreams-vocabulary/#dfn-name">name</a>
  • <a href="https://www.w3.org/TR/activitystreams-vocabulary/#dfn-icon">icon</a>
  • <a href="https://www.w3.org/TR/activitystreams-vocabulary/#dfn-image">image</a>
  • <a href="https://www.w3.org/TR/activitystreams-vocabulary/#dfn-inreplyto">inReplyTo</a>
  • <a href="https://www.w3.org/TR/activitystreams-vocabulary/#dfn-published">published</a>
  • <a href="https://www.w3.org/TR/activitystreams-vocabulary/#dfn-replies">replies</a>
  • <a href="https://www.w3.org/TR/activitystreams-vocabulary/#dfn-summary">summary</a>
  • <a href="https://www.w3.org/TR/activitystreams-vocabulary/#dfn-tag">tag</a>
  • <a href="https://www.w3.org/TR/activitystreams-vocabulary/#dfn-updated">updated</a>
  • <a href="https://www.w3.org/TR/activitystreams-vocabulary/#dfn-url">url</a>
  • <a href="https://www.w3.org/TR/activitystreams-vocabulary/#dfn-to">to</a>
  • <a href="https://www.w3.org/TR/activitystreams-vocabulary/#dfn-bto">bto</a>
  • <a href="https://www.w3.org/TR/activitystreams-vocabulary/#dfn-cc">cc</a>
  • <a href="https://www.w3.org/TR/activitystreams-vocabulary/#dfn-bcc">bcc</a>
  • <a href="https://www.w3.org/TR/activitystreams-vocabulary/#dfn-mediatype">mediaType</a>
  • …und mehr

Und auch wenn beispielsweise Place oder Event einige spezifische Eigenschaften haben, die nicht jede Plattform „kennt“ und „versteht“, sollte es immer möglich sein, die Beschreibung (content oder summary) und den Titel (name) anzuzeigen.

Das Prinzip ist ähnlich wie, wenn nicht sogar inspiriert durch, schema.org/Thing. Auch hier basieren alle Objekte letztendlich auf einem Thing und trotz der wesentlich größeren Anzahl1 an Objekten und Attributen, können Suchmaschinen sich immer sicher sein, dass es zumindest einen name, eine description und eine url zum Anzeigen gibt.

Bevor wir über also über ein content-fallback nachdenken, sollten wir (meiner Meinung nach) erst einmal dafür sorgen, dass die vorhanden Möglichkeiten richtig genutzt werden.

  1. The vocabulary currently consists of 806 Types, 1474 Properties 14 Datatypes, 90 Enumerations and 480 Enumeration members. – https://schema.org/docs/schemas.html ↩︎
jan,

Does Mastodon actually use summary? (Or does it only do so for Notes? I thought Articles just got a link and nothing else.)

(My main gripe with Mastodon isn’t that it doesn’t support Article, it is that is a pretty bad feed reader. There are much better readers for long-form posts.)

I currently also “disguise” my Articles as Notes, and include only a title—marked up “incorrectly,” alas—excerpt, and permalink.

But I’d love it if Mastodon (rather than try and become a full-fledged feed reader) would be able to “natively” recognize Articles’ (titles and) summaries!

/cc @deadsuperhero

(https://bddz.be/Xbb)

jan, to random

As of v2.0.0 of ActivityPub for WordPress, you can add this here code snippet to your WordPress site to stop it from silently accepting comment updates:

add_action( 'activitypub_handled_update', function( $activity, $second_param, $state, $reaction ) {if ( $reaction instanceof WP_Comment ) {wp_set_comment_status( $reaction, 'hold' );}}, 99, 4 );

That is, it won’t stop the comment from being updated, but it’ll require reapproval before it gets shown on your blog.

(I still don’t know what the second argument does exactly.) 🤣

https://jan.boddez.net/notes/130b3fcf6c

jan, to random

Drinking a Stout by The Garden Brewery.

https://jan.boddez.net/notes/f9819c000b

jan, to random

I used to use “reply posts” (or “reply notes”) almost exclusively, even when replying to myself, and rely on webmentions to somehow “thread” these notes together.

Actual comments will likely work better, keeping the entire discussion on a single page. My comments now support Webmention, too, so that’s no longer an issue. Plus, comment threading is coming to WordPress’ ActivityPub plugin.

So, anyway, I went ahead and added “ActivityPub threading” for “reply posts,” too. A matter of picking apart any Reply block and adding an inReplyTo property to the ActivityPub object.

Now if I ever use a “reply post” to comment on a post on another blog that supports ActivityPub, Mastodon might even show them underneath one another. Not sure if the ActivityPub plugin will ping the other blog, too—I guess it could?

If they then also support Webmention, they may end up receiving two “pings.” (I myself occasionally receive both webmentions and pingbacks; this wouldn’t be too different.)

https://jan.boddez.net/notes/5acbd77a66

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • cubers
  • DreamBathrooms
  • ngwrru68w68
  • Durango
  • osvaldo12
  • magazineikmin
  • mdbf
  • Youngstown
  • slotface
  • rosin
  • everett
  • kavyap
  • anitta
  • normalnudes
  • thenastyranch
  • khanakhh
  • cisconetworking
  • modclub
  • GTA5RPClips
  • InstantRegret
  • tacticalgear
  • provamag3
  • ethstaker
  • tester
  • Leos
  • megavids
  • lostlight
  • All magazines