@rmdes/indiekit-endpoint-activitypub 3.13.0 → 3.13.1

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.
@@ -453,7 +453,9 @@ router.put("/api/v1/statuses/:id", tokenRequired, scopeRequired("write", "write:
453
453
  : new URL(application.micropubEndpoint, application.url).href;
454
454
 
455
455
  const token =
456
- req.session?.access_token || req.mastodonToken?.accessToken;
456
+ req.session?.access_token ||
457
+ req.mastodonToken?.indieauthToken ||
458
+ req.mastodonToken?.accessToken;
457
459
  if (token) {
458
460
  const updatePayload = {
459
461
  action: "update",
@@ -513,13 +515,16 @@ router.put("/api/v1/statuses/:id", tokenRequired, scopeRequired("write", "write:
513
515
  const updated = await collections.ap_timeline.findOne({
514
516
  _id: item._id,
515
517
  });
516
- const { serializeStatus, setLocalIdentity } = await import(
517
- "../entities/status.js"
518
- );
519
- const handle = pluginOptions.actor?.handle || "";
520
- setLocalIdentity(localPublicationUrl, handle);
518
+ const interactionState = await loadItemInteractions(collections, updated);
519
+ const { replyIdMap, replyAccountIdMap } = await resolveReplyIds(collections.ap_timeline, [updated]);
521
520
 
522
- const serialized = serializeStatus(updated, { baseUrl });
521
+ const serialized = serializeStatus(updated, {
522
+ baseUrl,
523
+ ...interactionState,
524
+ pinnedIds: new Set(),
525
+ replyIdMap,
526
+ replyAccountIdMap,
527
+ });
523
528
  res.json(serialized);
524
529
  } catch (error) {
525
530
  next(error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rmdes/indiekit-endpoint-activitypub",
3
- "version": "3.13.0",
3
+ "version": "3.13.1",
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",