@rmdes/indiekit-endpoint-activitypub 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -150,8 +150,12 @@ export default class ActivityPubEndpoint {
150
150
  const self = this;
151
151
 
152
152
  // Let Fedify handle NodeInfo data (/nodeinfo/2.1)
153
+ // Only pass GET/HEAD requests — POST/PUT/DELETE must not go through
154
+ // Fedify here, because fromExpressRequest() consumes the body stream,
155
+ // breaking Express body-parsed routes downstream (e.g. admin forms).
153
156
  router.use((req, res, next) => {
154
157
  if (!self._fedifyMiddleware) return next();
158
+ if (req.method !== "GET" && req.method !== "HEAD") return next();
155
159
  return self._fedifyMiddleware(req, res, next);
156
160
  });
157
161
 
@@ -170,12 +170,17 @@ export function registerInboxListeners(inboxChain, options) {
170
170
  actorObj?.preferredUsername?.toString() ||
171
171
  actorUrl;
172
172
 
173
+ // Extract reply content (HTML)
174
+ const content = object.content?.toString() || "";
175
+
173
176
  await logActivity(collections, storeRawActivities, {
174
177
  direction: "inbound",
175
178
  type: "Reply",
176
179
  actorUrl,
177
180
  actorName,
178
181
  objectUrl: object.id?.href || "",
182
+ targetUrl: inReplyTo,
183
+ content,
179
184
  summary: `${actorName} replied to ${inReplyTo}`,
180
185
  });
181
186
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rmdes/indiekit-endpoint-activitypub",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "ActivityPub federation endpoint for Indiekit via Fedify. Adds full fediverse support: actor, inbox, outbox, followers, following, syndication, and Mastodon migration.",
5
5
  "keywords": [
6
6
  "indiekit",
@@ -13,7 +13,7 @@
13
13
  {{ card({
14
14
  title: follower.name or follower.handle or follower.actorUrl,
15
15
  url: follower.actorUrl,
16
- photo: { src: follower.avatar, alt: follower.name } if follower.avatar,
16
+ photo: { url: follower.avatar, alt: follower.name } if follower.avatar,
17
17
  description: { text: "@" + follower.handle if follower.handle },
18
18
  published: follower.followedAt
19
19
  }) }}