Changeset 5a93ac0 in Klonkt for src/routes/activitypub.js


Ignore:
Timestamp:
06/24/2026 11:16:28 AM (3 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
eb852c5
Parents:
065452a
Message:

feat(activitypub): federate images as attachments

Cover image + inline <img> are emitted as AP attachment (Document) with absolute
URLs + mediaType; <img> stripped from content (Mastodon strips it anyway). Outbox
+ post-create delivery now include cover_image_url.

Co-Authored-By: Claude <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/routes/activitypub.js

    r065452a r5a93ac0  
    5454  if (!site) return res.status(404).end();
    5555  const posts = db.prepare(
    56     `SELECT id, slug, title, content, published_at, created_at
     56    `SELECT id, slug, title, content, cover_image_url, published_at, created_at
    5757     FROM posts WHERE site_id = ? AND status = 'published' AND (fan_only IS NULL OR fan_only = 0)
    5858     ORDER BY COALESCE(published_at, created_at) DESC LIMIT 20`
Note: See TracChangeset for help on using the changeset viewer.