<%# Renders one fediverse thread node (n). Expects: n, t, canManageSite, _base, siteAvatar, formatDateTime, postSlug %>
<% if (n.actor_icon) { %> <% } else { %><%= (n.actor_name || '?').charAt(0).toUpperCase() %><% } %>
<% if (n.actor_url) { %><%= n.actor_name %> <% } else { %><%= n.actor_name %><% } %> <% if (n.actor_handle) { %><%= n.actor_handle %><% } %> <% if (n.created_at) { %><%= formatDateTime(n.created_at) %><% } %>
<%- n.content %>
<% if (n.mine && typeof canManageSite !== 'undefined' && canManageSite && n.outboxId) { %>
<% } else if (!n.mine && typeof canManageSite !== 'undefined' && canManageSite && n.id && typeof postSlug !== 'undefined' && postSlug) { %> <%# Owner: reply directly AS the site — no "your server" detour (it's your own site). %>
<%= t('fedi.remote_reply_short') %>
<% } else if (!n.mine && n.noteId) { %> <% } %>
<% if (n.children && n.children.length) { %>
    <% n.children.forEach(function(c){ %>
  1. <%- include('../partials/fedi-node', { n: c, t: t, canManageSite: (typeof canManageSite !== 'undefined' ? canManageSite : false), _base: _base, siteAvatar: (typeof siteAvatar !== 'undefined' ? siteAvatar : null), formatDateTime: formatDateTime, postSlug: (typeof postSlug !== 'undefined' ? postSlug : null) }) %>
  2. <% }); %>
<% } %>