Changeset c867b7b in Klonkt for src/views


Ignore:
Timestamp:
07/18/2026 10:31:01 PM (7 weeks ago)
Author:
Robin <roboburr@…>
Branches:
main
Children:
d49b60b
Parents:
05cd954
git-author:
Robin <roboburr@…> (07/18/2026 10:30:37 PM)
git-committer:
Robin <roboburr@…> (07/18/2026 10:31:01 PM)
Message:

Fix: visitors can reply to the site owner's own comments

The visitor 'reply via the fediverse' button only rendered on !mine thread
nodes, so the site's own comments offered visitors no action at all: you could
not answer the author's comment from your own instance (reported by Robin on
deno.klonkt.com, replying as sound-fabrics.com). The else-if now also renders
for mine-nodes with a noteId; owners never reach it (their mine/!mine branches
match first) and the own-reply note URI (/ap/notes/<id>) is AP-dereferenceable,
verified. Visitor view verified: the owner's comment now carries the button
with its note URI.

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

File:
1 edited

Legend:

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

    r05cd954 rc867b7b  
    4646        <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>
    4747      </form>
    48     <% } else if (!n.mine && n.noteId) { %>
     48    <% } else if (n.noteId) { %>
     49      <%# Visitor: reply via YOUR OWN instance. Also on the site's own (mine) comments —
     50          those are dereferenceable Notes (/ap/notes/<id>) too; without this a visitor
     51          could not reply to the owner's comments at all (only the owner branches above
     52          catch mine-nodes for managers, so this else-if never renders for the owner). %>
    4953      <button type="button" class="comment-reply-btn fedi-remote-reply-btn" data-fedi-uri="<%= n.noteId %>" data-fedi-ph="<%= t('fedi.remote_ph') %>">
    5054        <svg viewBox="0 0 24 24" width="13" height="13" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="9 17 4 12 9 7"/><path d="M20 18v-2a4 4 0 0 0-4-4H4"/></svg>
Note: See TracChangeset for help on using the changeset viewer.