@fedify/vocab-tools 2.4.0-dev.2259 → 2.4.0-dev.2260

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/src/class.ts CHANGED
@@ -25,6 +25,7 @@ const PORTABLE_DEREFERENCE_IMPORTS = [
25
25
  "createSnapshotContextLoader",
26
26
  "dereferencePortableIri",
27
27
  "getPortableResponseClaim",
28
+ "getReferrerGateways",
28
29
  "isPortableIri",
29
30
  "isPortableMode",
30
31
  "isUnsecuredPortableObject",
package/src/property.ts CHANGED
@@ -151,7 +151,16 @@ async function* generateProperty(
151
151
  span.end();
152
152
  }
153
153
  };
154
- if (isPortableIri(url)) return await dereferencePortable(url);
154
+ if (isPortableIri(url)) {
155
+ // A reference in a portable actor's own document, e.g., its outbox,
156
+ // has no location hints, so the actor's gateways are used instead:
157
+ return await dereferencePortable(
158
+ url,
159
+ options.gateways == null
160
+ ? { inferredGateways: getReferrerGateways(this, url) }
161
+ : {},
162
+ );
163
+ }
155
164
  const lookupUrl = formatIri(url);
156
165
  const portableMode = isPortableMode(this, options);
157
166
  if (portableMode) {