Changeset b7d4458 in Klonkt for src/routes/activitypub.js


Ignore:
Timestamp:
06/27/2026 08:10:43 AM (2 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
c21197a
Parents:
92f6976
Message:

feat(nsfw): custom content-warning text + blur in the Cirkel

  • Per-post content-warning text (like Mastodon): editor field; used as the on-site veil/banner label and the fediverse Note summary (falls back to 'Gevoelige inhoud').
  • Cirkel feed now blurs remote sensitive posts: ap_timeline gets nsfw+cw (captured from the incoming Note's sensitive/summary), getCirkelPosts returns them, circle.js maps them so post-card/tile show the veil.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/routes/activitypub.js

    r92f6976 rb7d4458  
    6767  if (!site) return res.status(404).end();
    6868  const posts = db.prepare(
    69     `SELECT id, slug, title, content, cover_image_url, nsfw, published_at, created_at
     69    `SELECT id, slug, title, content, cover_image_url, nsfw, content_warning, published_at, created_at
    7070     FROM posts WHERE site_id = ? AND status = 'published' AND (fan_only IS NULL OR fan_only = 0)
    7171     ORDER BY COALESCE(published_at, created_at) DESC LIMIT 20`
     
    9090  // rank 1 last) → Mastodon flips it back to pin-rank ascending on the profile.
    9191  const posts = db.prepare(
    92     `SELECT id, slug, title, content, cover_image_url, nsfw, published_at, created_at
     92    `SELECT id, slug, title, content, cover_image_url, nsfw, content_warning, published_at, created_at
    9393     FROM posts WHERE site_id = ? AND status = 'published' AND (fan_only IS NULL OR fan_only = 0)
    9494       AND pinned IS NOT NULL AND pinned > 0
Note: See TracChangeset for help on using the changeset viewer.