Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • About Bonfire
Maho Pacheco - Blog
Maho Pacheco - Blog
@blog@maho.dev  ·  activity timestamp 4 days ago

A Guide to Implementing ActivityPub in a Static Site (or Any Website) - Part 9: Quote Posts

Summary:

Find the index and earlier parts of this series here.

Quote Posts for Static Sites: A Practical Guide to FEP-044f Implementation

Transform your static blog into a consent-respecting quote-enabled node in the fediverse. This guide shows you how to implement quote post support that works with Mastodon, GoToSocial, and other ActivityPub servers while respecting author preferences.

In this guide: You’ll learn to build quote-enabled blog posts that can be responsibly shared across the fediverse

Find the index and earlier parts of this series here.

Quote Posts for Static Sites: A Practical Guide to FEP-044f Implementation

Transform your static blog into a consent-respecting quote-enabled node in the fediverse. This guide shows you how to implement quote post support that works with Mastodon, GoToSocial, and other ActivityPub servers while respecting author preferences.

In this guide: You’ll learn to build quote-enabled blog posts that can be responsibly shared across the fediverse

Why Quote Posts Matter (And Why They’re Controversial)

The User Experience Problem

Picture this: Someone finds your blog post fascinating and wants to share it with their followers, but they also want to add their own perspective or why is important. Without quote posts, they have two unsatisfying options:

  1. Simple share: Just boost with no commentary (or reply)
  2. Link sharing: Add a link to the blog post in their note

Neither option creates the rich, attributed conversations that make social media engaging.

The Solution: Consent-First Quote Implementation

We’re implementing FEP-044f: Consent-respecting quote posts in our federated blog.

What this means for your readers:

  • They can quote your posts with confidence that you’ve opted in
  • Their quotes include proper attribution and linking

What this means for you:

  • Automatic handling of quote requests
  • Future-ready for advanced moderation features (like in the fuuutuuure)

Implementation Overview

We are going to:

  1. Modify the Notes JSON to assert that the notes are quotable.
  2. Modify our Index function (the only dynamic POST endpoint) to handle quote requests and send the appropriate approval back (blanket approval).

1. Modifying the Notes: Enhanced ActivityPub Context

What We Changed: Extended the @context from a simple string to a rich object array supporting the GoToSocial namespace.

Before:

"@context": "https://www.w3.org/ns/activitystreams"

After:

"@context": [
 "https://www.w3.org/ns/activitystreams",
 {
 "gts": "https://gotosocial.org/ns#",
 "interactionPolicy": {"@id": "gts:interactionPolicy", "@type": "@id"},
 "canQuote": {"@id": "gts:canQuote", "@type": "@id"},
 "automaticApproval": {"@id": "gts:automaticApproval", "@type": "@id"}
 }
]

We are also adding this section at the end of the Note:

"interactionPolicy": {
 "canQuote": {
 "automaticApproval": "https://www.w3.org/ns/activitystreams#Public"
 }
}

If you want to be specific about who can quote your post, this is where you do it, read more in here.

You can see an example of the implementation in RssUtils.cs - in the GetNote method.

2: Quote Request Processing

Now we need to add the quote request handling system that processes incoming quote requests and automatically approves them based on our interaction policy.

New Components:

  • QuoteRequestService: Processes incoming quote requests from the fediverse
  • Auto-Approval Logic: Automatically approves public quote requests as defined in our interaction policy
  • Quote Authorization: Issues authorization tokens (stamps) for approved quotes

The Quote Request Flow:

sequenceDiagram
participant Requester as Fediverse User
participant Inbox as Our Inbox
participant QRS as QuoteRequestService
participant Target as Target Instance

Requester->>Inbox: QuoteRequest for our post
Inbox->>QRS: Process quote request
QRS->>QRS: Check interaction policy
QRS->>QRS: Generate authorization stamp
QRS->>Target: Send Accept + Authorization
Target->>Requester: Quote approved

Checkout the implementation in the QuoteRequestService.cs.

Key Takeaways

By implementing FEP-044f, we’re not just adding quote functionality - we’re building consent-respecting social interactions into the protocol level.

Why This Matters:

This implementation shows how static sites can participate in modern social web standards while keeping their simplicity and performance benefits. Right now, we’re automatically allowing all public quotes, but this foundation sets us up for more granular consent controls in the future - like requiring approval for specific users or implementing follower-only quoting.

The consent-respecting approach means our content can be shared thoughtfully across the fediverse, with the infrastructure already in place to handle more sophisticated permission systems as they evolve.

Next Steps: The Quote Visualization Challenge

Now that we’ve successfully implemented the backend infrastructure for consent-respecting quote posts, we face an equally important question: How should we display these quotes on our website?

Treat quoted posts as special reply types? Quotes have different semantic meaning than replies - they’re more like “shared with commentary” So maybe create a separate “Quoted By” section similar to how we handle likes and shares?

Any ideas?

Also readable in: https://maho.dev/2026/02/a-guide-to-implementing-activitypub-in-a-static-site-or-any-website-part-9-quote-posts/ by @mapache:

#fediverse #activitypub #static-sites #hugo #azure #mastodon #web-development #social-web #webfinger #http #quote-posts #fep-044f

GitHub

almost-static-activitypub/src/ActivityPubFunctions/QuoteRequestService.cs at main · mahomedalid/almost-static-activitypub

Adds an activity pub simple server to a static site using dotnet azure functions - mahomedalid/almost-static-activitypub
GitHub

almost-static-activitypub/src/Rss2Outbox/RssUtils.cs at main · mahomedalid/almost-static-activitypub

Adds an activity pub simple server to a static site using dotnet azure functions - mahomedalid/almost-static-activitypub

A guide to implement ActivityPub in a static site (or any website)

Hi! I have created this index for easy navigation. In Part 1, we will discuss why it is important to bring your site to the Fediverse. In Part 2, we will delve into an overview of the design of my implementation. In Part 3, we will make your blog discovereable in the fediverse. In Part 4, we will generate our notes and outbox, which contains posts ready to be shared in the Fediverse. Part 5, is an interlude to implement a subscribing to your site feature with fediverse accounts.
⁂
More from
Maho 🦝🍻

Cookie monster!

  • Copy link
  • Flag this post
  • Block

BT Free Social

BT Free is a non-profit organization founded by @ozoned@btfree.social . It's goal is for digital privacy rights, advocacy and consulting. This goal will be attained by hosting open platforms to allow others to seamlessly join the Fediverse on moderated instances or by helping others join the Fediverse.

BT Free Social: About · Code of conduct · Privacy ·
Bonfire social · 1.0.1 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Code of Conduct