# content
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\

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 include 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.

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 - Updated GetOutbox, GetNote, and GetCreateNote methods.

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.

Also readable in: https://maho.dev/2025/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