@rmdes/indiekit-endpoint-activitypub 1.1.1 → 1.1.2

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.
@@ -96,7 +96,7 @@ export function registerInboxListeners(inboxChain, options) {
96
96
  actorName: followerInfo.name,
97
97
  actorPhoto: followerInfo.photo,
98
98
  actorHandle: followerInfo.handle,
99
- published: follow.published ? new Date(follow.published) : new Date(),
99
+ published: follow.published ? String(follow.published) : new Date().toISOString(),
100
100
  createdAt: new Date().toISOString(),
101
101
  });
102
102
  })
@@ -258,7 +258,7 @@ export function registerInboxListeners(inboxChain, options) {
258
258
  actorHandle: actorInfo.handle,
259
259
  targetUrl: objectId,
260
260
  targetName: "", // Could fetch post title, but not critical
261
- published: like.published ? new Date(like.published) : new Date(),
261
+ published: like.published ? String(like.published) : new Date().toISOString(),
262
262
  createdAt: new Date().toISOString(),
263
263
  });
264
264
  })
@@ -306,7 +306,7 @@ export function registerInboxListeners(inboxChain, options) {
306
306
  actorHandle: actorInfo.handle,
307
307
  targetUrl: objectId,
308
308
  targetName: "", // Could fetch post title, but not critical
309
- published: announce.published ? new Date(announce.published).toISOString() : new Date().toISOString(),
309
+ published: announce.published ? String(announce.published) : new Date().toISOString(),
310
310
  createdAt: new Date().toISOString(),
311
311
  });
312
312
 
@@ -328,7 +328,7 @@ export function registerInboxListeners(inboxChain, options) {
328
328
  // Extract and store with boost metadata
329
329
  const timelineItem = await extractObjectData(object, {
330
330
  boostedBy: boosterInfo,
331
- boostedAt: announce.published ? new Date(announce.published).toISOString() : new Date().toISOString(),
331
+ boostedAt: announce.published ? String(announce.published) : new Date().toISOString(),
332
332
  });
333
333
 
334
334
  await addTimelineItem(collections, timelineItem);
@@ -404,7 +404,7 @@ export function registerInboxListeners(inboxChain, options) {
404
404
  text: contentText,
405
405
  html: contentHtml,
406
406
  },
407
- published: object.published ? new Date(object.published).toISOString() : new Date().toISOString(),
407
+ published: object.published ? String(object.published) : new Date().toISOString(),
408
408
  createdAt: new Date().toISOString(),
409
409
  });
410
410
  }
@@ -433,7 +433,7 @@ export function registerInboxListeners(inboxChain, options) {
433
433
  text: contentText,
434
434
  html: mentionHtml,
435
435
  },
436
- published: object.published ? new Date(object.published).toISOString() : new Date().toISOString(),
436
+ published: object.published ? String(object.published) : new Date().toISOString(),
437
437
  createdAt: new Date().toISOString(),
438
438
  });
439
439
 
@@ -124,7 +124,7 @@ export async function extractObjectData(object, options = {}) {
124
124
 
125
125
  // Published date — store as ISO string per Indiekit convention
126
126
  const published = object.published
127
- ? new Date(object.published).toISOString()
127
+ ? String(object.published)
128
128
  : new Date().toISOString();
129
129
 
130
130
  // Extract author — use async getAttributedTo() for Fedify objects
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rmdes/indiekit-endpoint-activitypub",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
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",