Changeset 67c1f24 in Klonkt for src/views/partials


Ignore:
Timestamp:
07/17/2026 12:38:54 AM (8 weeks ago)
Author:
Robin <roboburr@…>
Branches:
main
Children:
92a2c46
Parents:
3778ddb
git-author:
Robin <roboburr@…> (07/17/2026 12:38:34 AM)
git-committer:
Robin <roboburr@…> (07/17/2026 12:38:54 AM)
Message:

Feature: owner moderation of incoming replies (remove + tombstone + report)

The site owner could not remove an incoming reply, and thread-filling would
re-fetch a locally deleted one (crawlThread seeds its dedup set from
ap_interactions). New ap_rejected_objects table: rejectInteraction() (tenancy-
scoped to the owner's site) deletes the row and tombstones the object URI;
handleInbox and crawlThread skip tombstoned URIs, so a removed reply never
returns via re-delivery or thread-filling. A report action feeds sendReport
from the locally stored object/actor URIs, so flagging also works for private
notes that authorize_interaction cannot fetch (401/404). Thread nodes get
owner-only report + remove buttons (confirm via the global data-confirm
handler); i18n NL/EN/DE. Covered by test/reply-moderation.test.js (59 tests
green); full flow verified in a browser: buttons render for the logged-in
owner, remove deletes the reply and writes the tombstone. Beads: klonkt-demo-qul.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/partials/fedi-node.ejs

    r3778ddb r67c1f24  
    3939        </form>
    4040      </details>
     41      <%# Owner moderation: report to their instance + remove (tombstoned: never comes back via re-delivery or thread-crawl). %>
     42      <form method="post" action="<%= _base %>/interactions/<%= n.id %>/report" class="fedi-owner-react" data-confirm="<%= t('fedi.mod_report_confirm') %>">
     43        <button type="submit" class="fedi-cact fedi-cact-report" title="<%= t('fedi.report_send') %>" aria-label="<%= t('fedi.report_send') %>"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z"/><line x1="4" y1="22" x2="4" y2="15"/></svg></button>
     44      </form>
     45      <form method="post" action="<%= _base %>/interactions/<%= n.id %>/remove" class="fedi-owner-react" data-confirm="<%= t('fedi.mod_remove_confirm') %>">
     46        <button type="submit" class="fedi-cact fedi-cact-remove" title="<%= t('comments.delete') %>" aria-label="<%= t('comments.delete') %>"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="3 6 5 6 21 6"/><path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"/><path d="M9 6V4a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2"/></svg></button>
     47      </form>
    4148    <% } else if (!n.mine && n.noteId) { %>
    4249      <button type="button" class="comment-reply-btn fedi-remote-reply-btn" data-fedi-uri="<%= n.noteId %>" data-fedi-ph="<%= t('fedi.remote_ph') %>">
Note: See TracChangeset for help on using the changeset viewer.