feat: add Reply content/targetUrl fields, fix followers card photo crash
- inbox-listeners.js: Store `targetUrl` (inReplyTo) and `content` (HTML) on Reply activities for the conversations plugin AP adapter - activitypub-followers.njk: Fix photo property name (`src` → `url`) to match the card component's expected interface, fixing TypeError crash on followers page when avatars are present - Bump to v1.0.4
This commit is contained in:
@@ -170,12 +170,17 @@ export function registerInboxListeners(inboxChain, options) {
|
|||||||
actorObj?.preferredUsername?.toString() ||
|
actorObj?.preferredUsername?.toString() ||
|
||||||
actorUrl;
|
actorUrl;
|
||||||
|
|
||||||
|
// Extract reply content (HTML)
|
||||||
|
const content = object.content?.toString() || "";
|
||||||
|
|
||||||
await logActivity(collections, storeRawActivities, {
|
await logActivity(collections, storeRawActivities, {
|
||||||
direction: "inbound",
|
direction: "inbound",
|
||||||
type: "Reply",
|
type: "Reply",
|
||||||
actorUrl,
|
actorUrl,
|
||||||
actorName,
|
actorName,
|
||||||
objectUrl: object.id?.href || "",
|
objectUrl: object.id?.href || "",
|
||||||
|
targetUrl: inReplyTo,
|
||||||
|
content,
|
||||||
summary: `${actorName} replied to ${inReplyTo}`,
|
summary: `${actorName} replied to ${inReplyTo}`,
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@rmdes/indiekit-endpoint-activitypub",
|
"name": "@rmdes/indiekit-endpoint-activitypub",
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"description": "ActivityPub federation endpoint for Indiekit via Fedify. Adds full fediverse support: actor, inbox, outbox, followers, following, syndication, and Mastodon migration.",
|
"description": "ActivityPub federation endpoint for Indiekit via Fedify. Adds full fediverse support: actor, inbox, outbox, followers, following, syndication, and Mastodon migration.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"indiekit",
|
"indiekit",
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
{{ card({
|
{{ card({
|
||||||
title: follower.name or follower.handle or follower.actorUrl,
|
title: follower.name or follower.handle or follower.actorUrl,
|
||||||
url: follower.actorUrl,
|
url: follower.actorUrl,
|
||||||
photo: { src: follower.avatar, alt: follower.name } if follower.avatar,
|
photo: { url: follower.avatar, alt: follower.name } if follower.avatar,
|
||||||
description: { text: "@" + follower.handle if follower.handle },
|
description: { text: "@" + follower.handle if follower.handle },
|
||||||
published: follower.followedAt
|
published: follower.followedAt
|
||||||
}) }}
|
}) }}
|
||||||
|
|||||||
Reference in New Issue
Block a user