Changeset 55bc7f9 in Klonkt for src/views/pages/post.ejs


Ignore:
Timestamp:
06/24/2026 12:09:08 PM (3 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
3a2c9d3
Parents:
47a0d29
Message:

feat(activitypub): reply back to the fediverse (Phase 4 outbound)

Site owner can reply to an inbound fediverse interaction from the post page. The
reply is sent as a signed Create(Note) with inReplyTo + @Mention to the remote
actor's inbox + our followers, stored in ap_outbox, shown in the thread, and
resolvable at /ap/notes/<id>.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/pages/post.ejs

    r47a0d29 r55bc7f9  
    9696                </div>
    9797                <div class="fedi-text"><%- r.content %></div>
     98                <% var mine = (typeof fediverse.outReplies !== 'undefined' ? fediverse.outReplies : []).filter(function(o){ return o.in_reply_to && o.in_reply_to === r.object_uri; }); %>
     99                <% mine.forEach(function(o){ %>
     100                  <div class="fedi-ours"><span class="fedi-ours-label"><%= t('fedi.you') %></span> <span class="fedi-ours-body"><%- o.content %></span></div>
     101                <% }); %>
     102                <% if (typeof canManageSite !== 'undefined' && canManageSite) { %>
     103                  <details class="fedi-replybox">
     104                    <summary><%= t('fedi.reply') %></summary>
     105                    <form method="post" action="<%= _base %>/posts/<%= post.slug %>/fedi-reply">
     106                      <input type="hidden" name="interaction_id" value="<%= r.id %>">
     107                      <textarea name="text" rows="2" required placeholder="<%= t('fedi.reply_ph') %>"></textarea>
     108                      <button type="submit" class="btn btn-primary"><%= t('fedi.send') %></button>
     109                    </form>
     110                  </details>
     111                <% } %>
    98112              </div>
    99113            </li>
Note: See TracChangeset for help on using the changeset viewer.