Changeset 52ea6df in Klonkt


Ignore:
Timestamp:
06/24/2026 12:23:05 PM (3 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
82079ad
Parents:
3a2c9d3
Message:

fix(activitypub): show site avatar on our own fediverse replies

Outbound (Jij) replies showed only an initial; now use the site profile photo so
they match inbound replies.

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

Location:
src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/routes/posts.js

    r3a2c9d3 r52ea6df  
    753753  // Owner/admin of this site may reply back to a fediverse interaction.
    754754  const canManageSite = !!(req.session?.user && PermissionsService.canAdminSite(req.session.user, site));
     755  // Avatar for our own (outbound) fediverse replies = the site's profile photo.
     756  const siteAvatar = (site && site.profile_photo) ? site.profile_photo : null;
    755757
    756758  renderPage(req, res, 'pages/post', {
     
    763765    fediverse,
    764766    canManageSite,
     767    siteAvatar,
    765768    likeCount,
    766769    likedByMe,
  • src/views/pages/post.ejs

    r3a2c9d3 r52ea6df  
    116116                    <% mine.forEach(function(o){ %>
    117117                      <li class="comment comment-reply">
    118                         <div class="comment-avatar"><span><%= t('fedi.you').charAt(0).toUpperCase() %></span></div>
     118                        <div class="comment-avatar">
     119                          <% if (typeof siteAvatar !== 'undefined' && siteAvatar) { %><img src="<%= siteAvatar %>" alt="">
     120                          <% } else { %><span><%= t('fedi.you').charAt(0).toUpperCase() %></span><% } %>
     121                        </div>
    119122                        <div class="comment-body">
    120123                          <div class="comment-meta"><span class="comment-author"><%= t('fedi.you') %></span></div>
Note: See TracChangeset for help on using the changeset viewer.