Changeset 221a209 in Klonkt for src/routes/circle.js


Ignore:
Timestamp:
06/16/2026 08:52:32 PM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
2248cd2
Parents:
fb02cc0
Message:

Circle: carry over + display tags from the original post

Publisher puts tags as AS Hashtag array in the outbox (href pointing to the
source tag page). Consumer parses + caches them (remote_posts.tags). Feed
cards display them (post-card), and the reader shows tag chips that link to
the /tag page of the source.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/routes/circle.js

    rfb02cc0 r221a209  
    3030
    3131  const rows = db.prepare(`
    32     SELECT p.id, p.published, p.title, p.summary, p.media_json,
     32    SELECT p.id, p.published, p.title, p.summary, p.media_json, p.tags,
    3333           a.name AS actor_name
    3434    FROM remote_posts p
     
    5151      created_at: r.published,
    5252      type: 'post',
    53       tags: '',
     53      tags: r.tags || '',
    5454      pinned: 0,
    5555      status: 'published',
     
    8181
    8282  const row = db.prepare(`
    83     SELECT p.id, p.published, p.title, p.summary, p.url, p.media_json,
     83    SELECT p.id, p.published, p.title, p.summary, p.url, p.media_json, p.tags,
    8484           a.name AS actor_name, a.url AS actor_url, a.avatar AS actor_avatar
    8585    FROM remote_posts p
     
    100100    sourceAvatar: safeUrl(row.actor_avatar),
    101101    originalUrl: safeUrl(row.url),
     102    tags: (row.tags || '').split(',').map((t) => t.trim()).filter(Boolean),
     103    sourceTagBase: safeUrl(row.actor_url) ? safeUrl(row.actor_url).replace(/\/+$/, '') : null,
    102104  };
    103105
Note: See TracChangeset for help on using the changeset viewer.