Changeset c16e0a5 in Klonkt for src/config/database.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/config/database.js

    reb852c5 rc16e0a5  
    316316    );
    317317    CREATE INDEX IF NOT EXISTS idx_ap_followers_slug ON ap_followers(slug);
     318    CREATE TABLE IF NOT EXISTS ap_interactions (
     319      id INTEGER PRIMARY KEY AUTOINCREMENT,
     320      kind TEXT NOT NULL,                   -- 'reply' | 'like' | 'announce'
     321      post_id TEXT NOT NULL,
     322      object_uri TEXT NOT NULL DEFAULT '',  -- remote note id (reply) or '' (like/announce)
     323      actor_uri TEXT NOT NULL,
     324      actor_name TEXT,
     325      actor_handle TEXT,
     326      actor_url TEXT,
     327      actor_icon TEXT,
     328      content TEXT,                         -- sanitized HTML (reply)
     329      published TEXT,
     330      created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
     331      UNIQUE(kind, post_id, actor_uri, object_uri)
     332    );
     333    CREATE INDEX IF NOT EXISTS idx_ap_inter_post ON ap_interactions(post_id, kind);
    318334  `);
    319335}
Note: See TracChangeset for help on using the changeset viewer.