Changeset c16e0a5 in Klonkt for src/routes/posts.js


Ignore:
Timestamp:
06/24/2026 11:44:23 AM (3 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
47a0d29
Parents:
eb852c5
Message:

feat(activitypub): inbound interactions — replies, likes, boosts (Phase 2)

Inbox now stores incoming Create(reply to our note), Like and Announce (boost),
plus Undo(Like/Announce) and Delete(reply). New ap_interactions table; the post
page shows a 'From the fediverse' section (counts + replies with avatar/handle,
sanitized). Actor name/icon resolved best-effort; reply HTML sanitized.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/routes/posts.js

    reb852c5 rc16e0a5  
    748748    db.prepare('SELECT 1 FROM post_likes WHERE post_id = ? AND user_id = ?').get(post.id, req.session.user.id));
    749749
     750  // Inbound fediverse activity (replies/likes/boosts) for this post.
     751  let fediverse = { replies: [], likeCount: 0, announceCount: 0, total: 0 };
     752  try { fediverse = ActivityPubService.getInteractions(post.id); } catch { /* non-fatal */ }
     753
    750754  renderPage(req, res, 'pages/post', {
    751755    post,
     
    755759    comments: topLevel,
    756760    totalComments,
     761    fediverse,
    757762    likeCount,
    758763    likedByMe,
Note: See TracChangeset for help on using the changeset viewer.