@rmdes/indiekit-endpoint-activitypub 3.5.4 → 3.5.6

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
@@ -1416,7 +1416,7 @@ export default class ActivityPubEndpoint {
1416
1416
  );
1417
1417
  this._collections.ap_oauth_tokens.createIndex(
1418
1418
  { accessToken: 1 },
1419
- { unique: true, background: true },
1419
+ { unique: true, sparse: true, background: true },
1420
1420
  );
1421
1421
  this._collections.ap_oauth_tokens.createIndex(
1422
1422
  { code: 1 },
@@ -91,9 +91,11 @@ export async function resolveAuthor(
91
91
  }
92
92
 
93
93
  // Strategy 2: Use author URL from timeline or notifications
94
+ // Support both Map (admin controllers) and plain object (Mastodon API)
94
95
  if (collections) {
95
- const ap_timeline = collections.get("ap_timeline");
96
- const ap_notifications = collections.get("ap_notifications");
96
+ const col = (name) => collections.get?.(name) ?? collections[name];
97
+ const ap_timeline = col("ap_timeline");
98
+ const ap_notifications = col("ap_notifications");
97
99
 
98
100
  // Search timeline by both uid (canonical) and url (display)
99
101
  let authorUrl = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rmdes/indiekit-endpoint-activitypub",
3
- "version": "3.5.4",
3
+ "version": "3.5.6",
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",