@fedify/fedify 1.9.0-pr.407.1544 → 1.9.0-pr.421.1747
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/dist/{actor-Ch5yFYFG.d.ts → actor-C1Euqngb.d.ts} +1 -1
- package/dist/{actor-CeBu8hLy.js → actor-CNV1ck1S.js} +1 -1
- package/dist/actor-DaFSkBV-.cjs +42606 -0
- package/dist/{actor-BY--uubW.js → actor-J-9oLs-V.js} +6951 -2127
- package/dist/actor-Ydzhc8dj.d.cts +128 -0
- package/dist/{authdocloader-C89pKQKE.js → authdocloader-D4qQkXT9.js} +6 -6
- package/dist/{authdocloader-jHzDqZo2.js → authdocloader-DKEFUico.js} +3 -3
- package/dist/authdocloader-DM1vtjbY.cjs +58 -0
- package/dist/{builder-ClMKBUks.js → builder-2yBgTZpU.js} +14 -8
- package/dist/chunk-DqRYRqnO.cjs +34 -0
- package/dist/client-DjT_tegg.d.cts +294 -0
- package/dist/{client-DB3mC1oJ.js → client-nAHORZym.js} +1 -1
- package/dist/compat/mod.cjs +10 -0
- package/dist/compat/mod.d.cts +13 -0
- package/dist/compat/mod.d.ts +7 -7
- package/dist/compat/mod.js +5 -5
- package/dist/compat/transformers.test.js +16 -16
- package/dist/compat-DmDDELst.cjs +4 -0
- package/dist/compat-nxUqe4Z-.js +4 -0
- package/dist/{context-DFruNLny.d.ts → context-CXUibY4L.d.ts} +179 -116
- package/dist/context-CwUAkopp.d.cts +2324 -0
- package/dist/{docloader-BJTPo7_i.js → docloader-BRrqMbX0.js} +188 -8
- package/dist/docloader-D-MrRyHl.d.cts +219 -0
- package/dist/docloader-FAn755Ez.cjs +4862 -0
- package/dist/{esm-BjUpSZdQ.js → esm-CZDlG8Yt.js} +1 -1
- package/dist/federation/builder.test.js +5 -5
- package/dist/federation/collection.test.js +3 -3
- package/dist/federation/handler.test.js +17 -17
- package/dist/federation/idempotency.test.d.ts +3 -0
- package/dist/federation/idempotency.test.js +202 -0
- package/dist/federation/inbox.test.js +4 -4
- package/dist/federation/keycache.test.js +4 -4
- package/dist/federation/kv.test.js +4 -3
- package/dist/federation/middleware.test.js +18 -18
- package/dist/federation/mod.cjs +29 -0
- package/dist/federation/mod.d.cts +13 -0
- package/dist/federation/mod.d.ts +7 -7
- package/dist/federation/mod.js +15 -15
- package/dist/federation/mq.test.js +3 -3
- package/dist/federation/retry.test.js +3 -3
- package/dist/federation/router.test.js +3 -3
- package/dist/federation/send.test.js +10 -10
- package/dist/{federation-CMX7WzeL.js → federation-D1U8YY9t.js} +3 -3
- package/dist/federation-H2_En3j5.cjs +244 -0
- package/dist/fixtures/media.example.com/avatars/test-avatar.jpg.json +6 -0
- package/dist/{http-sU0Wj-tv.js → http-B0Rp4UOp.js} +7 -7
- package/dist/http-B1_DzfAU.d.cts +253 -0
- package/dist/{http-3pAI0mqb.js → http-CyMjXkYA.js} +3 -3
- package/dist/http-D7xo4v5M.cjs +826 -0
- package/dist/{http-D8Q4xH0d.d.ts → http-wsGR6KkT.d.ts} +1 -1
- package/dist/{inbox-Dg825gXU.js → inbox-CAt-VuhL.js} +29 -7
- package/dist/key-BZBF55sg.cjs +10 -0
- package/dist/key-CKScBmP1.js +10 -0
- package/dist/{key-l5QMtRss.js → key-D7A24D7c.js} +5 -5
- package/dist/key-DFZ_CvG0.cjs +290 -0
- package/dist/{key-RzI0hV7H.js → key-DbX-_KvI.js} +2 -2
- package/dist/{key-BWgRsIwz.js → key-uBD0-2wc.js} +3 -3
- package/dist/{keycache-BGlP5YTm.js → keycache-DVVM5m9f.js} +1 -1
- package/dist/{keys-BRbwmdDJ.js → keys-Hl2h0ZG0.js} +1 -1
- package/dist/kv-63Cil1MD.d.cts +81 -0
- package/dist/{ld-C9E9DPBz.js → ld-e-G3iYdn.js} +4 -4
- package/dist/{lookup-oZxe6kZr.js → lookup-DNGo5BR6.js} +21 -12
- package/dist/lookup-DSSOyhz2.cjs +137 -0
- package/dist/{lookup-CN62_yPh.js → lookup-Zzj9McvA.js} +4 -4
- package/dist/{middleware-extU7qDB.js → middleware-4mR2kSKQ.js} +96 -65
- package/dist/middleware-B-YooLeX.cjs +17 -0
- package/dist/middleware-BG51vY-0.js +17 -0
- package/dist/{middleware-jQ1GPh2U.js → middleware-BWW4nCk1.js} +57 -54
- package/dist/middleware-CVb0KXM7.cjs +4271 -0
- package/dist/middleware-DXunR6sJ.js +26 -0
- package/dist/mod-BUbqxBev.d.cts +307 -0
- package/dist/{mod-CiXjux2r.d.ts → mod-BcObK1Lz.d.ts} +2 -2
- package/dist/mod-C2tOeRkN.d.cts +1 -0
- package/dist/{mod-Cy6pkZSn.d.ts → mod-CDObsV1d.d.ts} +19 -1
- package/dist/{mod-BAuhKa9d.d.ts → mod-CIbqfZW0.d.ts} +1 -1
- package/dist/{mod-B7Pc0I7F.d.ts → mod-DgcYoyZK.d.ts} +2 -2
- package/dist/mod-Dt-G9ZOS.d.cts +102 -0
- package/dist/mod-FZd39qVq.d.cts +1 -0
- package/dist/mod-fjqfsrty.d.cts +266 -0
- package/dist/mod-jQ4OODsl.d.cts +113 -0
- package/dist/mod-mXx9V0q5.d.cts +80 -0
- package/dist/mod.cjs +152 -0
- package/dist/mod.d.cts +17 -0
- package/dist/mod.d.ts +10 -10
- package/dist/mod.js +20 -20
- package/dist/mq-B7R1Q-M5.d.cts +140 -0
- package/dist/nodeinfo/client.test.js +5 -5
- package/dist/nodeinfo/handler.test.js +16 -16
- package/dist/nodeinfo/mod.cjs +13 -0
- package/dist/nodeinfo/mod.d.cts +5 -0
- package/dist/nodeinfo/mod.js +6 -6
- package/dist/nodeinfo/semver.test.js +3 -3
- package/dist/nodeinfo/types.test.js +3 -3
- package/dist/nodeinfo-Co9lJrWl.cjs +4 -0
- package/dist/nodeinfo-DfycQ8Wf.js +4 -0
- package/dist/owner-6KSEp9eV.d.cts +67 -0
- package/dist/{owner-D38zBIMc.d.ts → owner-BbeUDvOu.d.ts} +2 -2
- package/dist/{owner-B836JKuZ.js → owner-C4sPn9c4.js} +2 -2
- package/dist/{proof-D63mA1Rv.js → proof-C3QoDkRC.js} +3 -3
- package/dist/proof-DT8hWqV6.cjs +673 -0
- package/dist/{proof-DLwnfKak.js → proof-iy7cOAt6.js} +9 -9
- package/dist/runtime/authdocloader.test.js +9 -9
- package/dist/runtime/docloader.test.js +4 -4
- package/dist/runtime/key.test.js +5 -5
- package/dist/runtime/langstr.test.js +3 -3
- package/dist/runtime/link.test.d.ts +3 -0
- package/dist/runtime/link.test.js +61 -0
- package/dist/runtime/mod.cjs +25 -0
- package/dist/runtime/mod.d.cts +6 -0
- package/dist/runtime/mod.d.ts +3 -3
- package/dist/runtime/mod.js +10 -10
- package/dist/runtime/multibase/multibase.test.js +3 -3
- package/dist/runtime/url.test.js +3 -3
- package/dist/runtime-C58AJWSv.cjs +4 -0
- package/dist/runtime-DPYEDf-o.js +4 -0
- package/dist/{send-CE9GFSCd.js → send-BOn6IbzV.js} +2 -2
- package/dist/sig/http.test.js +9 -9
- package/dist/sig/key.test.js +6 -6
- package/dist/sig/ld.test.js +7 -7
- package/dist/sig/mod.cjs +30 -0
- package/dist/sig/mod.d.cts +8 -0
- package/dist/sig/mod.d.ts +5 -5
- package/dist/sig/mod.js +10 -10
- package/dist/sig/owner.test.js +7 -7
- package/dist/sig/proof.test.js +7 -7
- package/dist/sig-ByHXzqUi.cjs +4 -0
- package/dist/sig-Cj3tk-ig.js +4 -0
- package/dist/testing/docloader.test.js +3 -3
- package/dist/testing/mod.d.ts +385 -110
- package/dist/testing/mod.js +3 -3
- package/dist/{testing-B2tgn0a4.js → testing-DaKcIaFF.js} +2 -2
- package/dist/{transformers-Dna8Fg7k.js → transformers-BFT6d7J5.js} +3 -3
- package/dist/transformers-CoBS-oFG.cjs +116 -0
- package/dist/{type-OboVsUha.js → type-D50ufokc.js} +7261 -2257
- package/dist/{types-BLr6AjjI.js → types-BCmRSiaD.js} +4 -4
- package/dist/types-wG2EuWYS.cjs +488 -0
- package/dist/vocab/actor.test.js +5 -5
- package/dist/vocab/lookup.test.js +255 -5
- package/dist/vocab/mod.cjs +87 -0
- package/dist/vocab/mod.d.cts +6 -0
- package/dist/vocab/mod.d.ts +3 -3
- package/dist/vocab/mod.js +7 -7
- package/dist/vocab/type.test.js +3 -3
- package/dist/vocab/vocab.test.js +433 -9
- package/dist/vocab-B_AjsPE2.cjs +291 -0
- package/dist/{vocab-BEEm2I6u.d.ts → vocab-CDHNj5zp.d.ts} +290 -0
- package/dist/vocab-Cfs0937i.d.cts +14919 -0
- package/dist/{vocab-Z7alheNv.js → vocab-CtBL6Aur.js} +26 -17
- package/dist/webfinger/handler.test.js +16 -16
- package/dist/webfinger/lookup.test.js +4 -4
- package/dist/webfinger/mod.cjs +9 -0
- package/dist/webfinger/mod.d.cts +4 -0
- package/dist/webfinger/mod.js +6 -6
- package/dist/webfinger-BjOEdFPs.cjs +4 -0
- package/dist/webfinger-De_bU0iE.js +4 -0
- package/dist/x/cfworkers.cjs +100 -0
- package/dist/x/cfworkers.d.cts +59 -0
- package/dist/x/cfworkers.js +3 -3
- package/dist/x/cfworkers.test.js +3 -3
- package/dist/x/hono.cjs +61 -0
- package/dist/x/hono.d.cts +54 -0
- package/dist/x/hono.d.ts +6 -6
- package/dist/x/hono.js +3 -3
- package/dist/x/sveltekit.cjs +69 -0
- package/dist/x/sveltekit.d.cts +46 -0
- package/dist/x/sveltekit.d.ts +6 -6
- package/dist/x/sveltekit.js +3 -3
- package/package.json +68 -13
- package/dist/compat-Bb5myD13.js +0 -4
- package/dist/key-_XZAOE9D.js +0 -10
- package/dist/middleware-Ccahu3ql.js +0 -26
- package/dist/middleware-fO804EqJ.js +0 -17
- package/dist/nodeinfo-CyEbLjHs.js +0 -4
- package/dist/runtime-BSkOVUWM.js +0 -4
- package/dist/sig-BXJO--F9.js +0 -4
- package/dist/webfinger-C3GIyXIg.js +0 -4
@@ -3,22 +3,22 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, deno_default, getDocumentLoader, getTypeId, kvCache, lookupWebFinger } from "./type-
|
7
|
-
import { getNodeInfo } from "./client-
|
8
|
-
import { RouterError, lookupObject, traverseCollection } from "./lookup-
|
6
|
+
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, deno_default, getDocumentLoader, getTypeId, kvCache, lookupWebFinger } from "./type-D50ufokc.js";
|
7
|
+
import { getNodeInfo } from "./client-nAHORZym.js";
|
8
|
+
import { RouterError, lookupObject, traverseCollection } from "./lookup-DNGo5BR6.js";
|
9
9
|
import { nodeInfoToJson } from "./types-BIgY6c-l.js";
|
10
|
-
import { exportJwk, importJwk, validateCryptoKey } from "./key-
|
11
|
-
import { verifyRequest } from "./http-
|
12
|
-
import { getAuthenticatedDocumentLoader } from "./authdocloader-
|
13
|
-
import { detachSignature, hasSignature, signJsonLd, verifyJsonLd } from "./ld-
|
14
|
-
import { doesActorOwnKey, getKeyOwner } from "./owner-
|
15
|
-
import { signObject, verifyObject } from "./proof-
|
16
|
-
import { routeActivity } from "./inbox-
|
17
|
-
import { FederationBuilderImpl } from "./builder-
|
10
|
+
import { exportJwk, importJwk, validateCryptoKey } from "./key-DbX-_KvI.js";
|
11
|
+
import { verifyRequest } from "./http-CyMjXkYA.js";
|
12
|
+
import { getAuthenticatedDocumentLoader } from "./authdocloader-DKEFUico.js";
|
13
|
+
import { detachSignature, hasSignature, signJsonLd, verifyJsonLd } from "./ld-e-G3iYdn.js";
|
14
|
+
import { doesActorOwnKey, getKeyOwner } from "./owner-C4sPn9c4.js";
|
15
|
+
import { signObject, verifyObject } from "./proof-C3QoDkRC.js";
|
16
|
+
import { routeActivity } from "./inbox-CAt-VuhL.js";
|
17
|
+
import { FederationBuilderImpl } from "./builder-2yBgTZpU.js";
|
18
18
|
import { buildCollectionSynchronizationHeader } from "./collection-CSzG2j1P.js";
|
19
|
-
import { KvKeyCache } from "./keycache-
|
19
|
+
import { KvKeyCache } from "./keycache-DVVM5m9f.js";
|
20
20
|
import { createExponentialBackoffPolicy } from "./retry-D4GJ670a.js";
|
21
|
-
import { extractInboxes, sendActivity } from "./send-
|
21
|
+
import { extractInboxes, sendActivity } from "./send-BOn6IbzV.js";
|
22
22
|
import { getLogger, withContext } from "@logtape/logtape";
|
23
23
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
24
24
|
import { ATTR_HTTP_REQUEST_HEADER, ATTR_HTTP_REQUEST_METHOD, ATTR_HTTP_RESPONSE_HEADER, ATTR_HTTP_RESPONSE_STATUS_CODE, ATTR_URL_FULL } from "@opentelemetry/semantic-conventions";
|
@@ -671,7 +671,8 @@ async function handleInbox(request, options) {
|
|
671
671
|
* @param span The OpenTelemetry span for tracing.
|
672
672
|
* @returns A promise that resolves to an HTTP response.
|
673
673
|
*/
|
674
|
-
async function handleInboxInternal(request,
|
674
|
+
async function handleInboxInternal(request, parameters, span) {
|
675
|
+
const { recipient, context: ctx, inboxContextFactory, kv, kvPrefixes, queue, actorDispatcher, inboxListeners, inboxErrorHandler, onNotFound, signatureTimeWindow, skipSignatureVerification, tracerProvider } = parameters;
|
675
676
|
const logger$2 = getLogger([
|
676
677
|
"fedify",
|
677
678
|
"federation",
|
@@ -873,7 +874,8 @@ async function handleInboxInternal(request, { recipient, context: ctx, inboxCont
|
|
873
874
|
kvPrefixes,
|
874
875
|
queue,
|
875
876
|
span,
|
876
|
-
tracerProvider
|
877
|
+
tracerProvider,
|
878
|
+
idempotencyStrategy: parameters.idempotencyStrategy
|
877
879
|
});
|
878
880
|
if (routeResult === "alreadyProcessed") return new Response(`Activity <${activity.id}> has already been processed.`, {
|
879
881
|
status: 202,
|
@@ -903,7 +905,7 @@ async function handleInboxInternal(request, { recipient, context: ctx, inboxCont
|
|
903
905
|
/**
|
904
906
|
* Handles a custom collection request.
|
905
907
|
* @template TItem The type of items in the collection.
|
906
|
-
* @template
|
908
|
+
* @template TParam The parameter names of the requested URL.
|
907
909
|
* @template TContext The type of the context, extending {@link RequestContext}.
|
908
910
|
* @template TContextData The context data to pass to the `TContext`.
|
909
911
|
* @param request The HTTP request.
|
@@ -922,7 +924,7 @@ async function _handleCustomCollection(request, { name, values, context: context
|
|
922
924
|
/**
|
923
925
|
* Handles an ordered collection request.
|
924
926
|
* @template TItem The type of items in the collection.
|
925
|
-
* @template
|
927
|
+
* @template TParam The parameter names of the requested URL.
|
926
928
|
* @template TContext The type of the context, extending {@link RequestContext}.
|
927
929
|
* @template TContextData The context data to pass to the `TContext`.
|
928
930
|
* @param request The HTTP request.
|
@@ -943,7 +945,7 @@ async function _handleOrderedCollection(request, { name, values, context: contex
|
|
943
945
|
* The main flow is on `getCollection`, `dispatch`.
|
944
946
|
*
|
945
947
|
* @template TItem The type of items in the collection.
|
946
|
-
* @template
|
948
|
+
* @template TParam The parameter names of the requested URL.
|
947
949
|
* @template TContext The type of the context. {@link Context} or {@link RequestContext}.
|
948
950
|
* @template TContextData The context data to pass to the `TContext`.
|
949
951
|
* @template TCollection The type of the collection, extending {@link Collection}.
|
@@ -977,14 +979,14 @@ var CustomCollectionHandler = class {
|
|
977
979
|
#collection = null;
|
978
980
|
/**
|
979
981
|
* Creates a new CustomCollection instance.
|
980
|
-
* @param
|
981
|
-
* @param
|
982
|
-
* @param
|
983
|
-
* @param
|
984
|
-
* @param
|
985
|
-
* @param
|
986
|
-
* @param
|
987
|
-
* @param
|
982
|
+
* @param name The name of the collection.
|
983
|
+
* @param values The parameter values for the collection.
|
984
|
+
* @param context The request context.
|
985
|
+
* @param callbacks The collection callbacks.
|
986
|
+
* @param tracerProvider The tracer provider for telemetry.
|
987
|
+
* @param Collection The Collection constructor.
|
988
|
+
* @param CollectionPage The CollectionPage constructor.
|
989
|
+
* @param filterPredicate Optional filter predicate for items.
|
988
990
|
*/
|
989
991
|
constructor(name, values, context$1, callbacks, tracerProvider = trace.getTracerProvider(), Collection$1, CollectionPage$1, filterPredicate) {
|
990
992
|
this.name = name;
|
@@ -1109,7 +1111,7 @@ var CustomCollectionHandler = class {
|
|
1109
1111
|
/**
|
1110
1112
|
* Creates a function to wrap the dispatcher so tracing can be applied.
|
1111
1113
|
* @param params Parameters including cursor and total items.
|
1112
|
-
* @returns
|
1114
|
+
* @returns A function that handles the span operation.
|
1113
1115
|
*/
|
1114
1116
|
spanPages = ({ totalItems = null, cursor = null }) => async (span) => {
|
1115
1117
|
try {
|
@@ -1130,23 +1132,23 @@ var CustomCollectionHandler = class {
|
|
1130
1132
|
};
|
1131
1133
|
/**
|
1132
1134
|
* Dispatches the collection request to get items.
|
1133
|
-
* @param
|
1134
|
-
* @returns
|
1135
|
+
* @param cursor The cursor for pagination, or null for the first page.
|
1136
|
+
* @returns A promise that resolves to the page items.
|
1135
1137
|
*/
|
1136
1138
|
async dispatch(cursor = null) {
|
1137
1139
|
return await this.#dispatcher(this.context, this.values, cursor) ?? new ItemsNotFoundError().throw();
|
1138
1140
|
}
|
1139
1141
|
/**
|
1140
1142
|
* Filters the items in the collection.
|
1141
|
-
* @param
|
1142
|
-
* @returns
|
1143
|
+
* @param items The items to filter.
|
1144
|
+
* @returns The filtered items.
|
1143
1145
|
*/
|
1144
1146
|
filterItems(items) {
|
1145
1147
|
return filterCollectionItems(items, this.name, this.filterPredicate);
|
1146
1148
|
}
|
1147
1149
|
/**
|
1148
1150
|
* Appends a cursor to the URL if it exists.
|
1149
|
-
* @param
|
1151
|
+
* @param cursor The cursor to append, or null/undefined.
|
1150
1152
|
* @returns The URL with cursor appended, or null if cursor is null/undefined.
|
1151
1153
|
*/
|
1152
1154
|
appendToUrl(cursor) {
|
@@ -1154,8 +1156,7 @@ var CustomCollectionHandler = class {
|
|
1154
1156
|
}
|
1155
1157
|
/**
|
1156
1158
|
* Gets the stored collection or collection page.
|
1157
|
-
* @returns
|
1158
|
-
the collection or collection page.
|
1159
|
+
* @returns A promise that resolves to the collection or collection page.
|
1159
1160
|
*/
|
1160
1161
|
get collection() {
|
1161
1162
|
if (this.#collection === null) this.#collection = this.getCollection();
|
@@ -1163,8 +1164,8 @@ var CustomCollectionHandler = class {
|
|
1163
1164
|
}
|
1164
1165
|
/**
|
1165
1166
|
* Gets the total number of items in the collection.
|
1166
|
-
* @returns
|
1167
|
-
|
1167
|
+
* @returns A promise that resolves to the total items count,
|
1168
|
+
* or null if not available.
|
1168
1169
|
*/
|
1169
1170
|
get totalItems() {
|
1170
1171
|
if (this.#totalItems === void 0) this.totalItems = this.callbacks.counter?.(this.context, this.values);
|
@@ -1180,8 +1181,8 @@ var CustomCollectionHandler = class {
|
|
1180
1181
|
}
|
1181
1182
|
/**
|
1182
1183
|
* Gets the first cursor for pagination.
|
1183
|
-
* @returns
|
1184
|
-
or null if not available.
|
1184
|
+
* @returns A promise that resolves to the first cursor,
|
1185
|
+
* or null if not available.
|
1185
1186
|
*/
|
1186
1187
|
get firstCursor() {
|
1187
1188
|
const cursor = this.callbacks.firstCursor?.(this.context, this.values);
|
@@ -2151,7 +2152,8 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
2151
2152
|
onNotFound,
|
2152
2153
|
signatureTimeWindow: this.signatureTimeWindow,
|
2153
2154
|
skipSignatureVerification: this.skipSignatureVerification,
|
2154
|
-
tracerProvider: this.tracerProvider
|
2155
|
+
tracerProvider: this.tracerProvider,
|
2156
|
+
idempotencyStrategy: this.idempotencyStrategy
|
2155
2157
|
});
|
2156
2158
|
case "following": return await handleCollection(request, {
|
2157
2159
|
name: "following",
|
@@ -2542,15 +2544,16 @@ var ContextImpl = class ContextImpl {
|
|
2542
2544
|
"actor"
|
2543
2545
|
]);
|
2544
2546
|
if (this.federation.actorCallbacks?.keyPairsDispatcher == null) throw new Error("No actor key pairs dispatcher registered.");
|
2545
|
-
|
2546
|
-
|
2547
|
-
|
2548
|
-
})
|
2549
|
-
|
2550
|
-
|
2551
|
-
|
2547
|
+
let actorUri;
|
2548
|
+
try {
|
2549
|
+
actorUri = this.getActorUri(identifier);
|
2550
|
+
} catch (error) {
|
2551
|
+
if (error instanceof RouterError) {
|
2552
|
+
logger$2.warn(error.message);
|
2553
|
+
return [];
|
2554
|
+
}
|
2555
|
+
throw error;
|
2552
2556
|
}
|
2553
|
-
const actorUri = new URL(path, this.canonicalOrigin);
|
2554
2557
|
const keyPairs = await this.federation.actorCallbacks?.keyPairsDispatcher(new ContextImpl({
|
2555
2558
|
...this,
|
2556
2559
|
invokedFromActorKeyPairsDispatcher: { identifier }
|
@@ -2711,12 +2714,11 @@ var ContextImpl = class ContextImpl {
|
|
2711
2714
|
if (identifier == null) throw new Error("If recipients is \"followers\", sender must be an actor identifier or username.");
|
2712
2715
|
expandedRecipients = [];
|
2713
2716
|
for await (const recipient of this.getFollowers(identifier)) expandedRecipients.push(recipient);
|
2714
|
-
if (options.syncCollection) {
|
2715
|
-
|
2716
|
-
|
2717
|
-
|
2718
|
-
|
2719
|
-
opts.collectionSync = collectionId == null ? void 0 : new URL(collectionId, this.canonicalOrigin).href;
|
2717
|
+
if (options.syncCollection) try {
|
2718
|
+
opts.collectionSync = this.getFollowersUri(identifier).href;
|
2719
|
+
} catch (error) {
|
2720
|
+
if (error instanceof RouterError) opts.collectionSync = void 0;
|
2721
|
+
else throw error;
|
2720
2722
|
}
|
2721
2723
|
} else expandedRecipients = [recipients];
|
2722
2724
|
span.setAttribute("activitypub.inboxes", expandedRecipients.length);
|
@@ -2901,7 +2903,8 @@ var ContextImpl = class ContextImpl {
|
|
2901
2903
|
kvPrefixes: this.federation.kvPrefixes,
|
2902
2904
|
queue: this.federation.inboxQueue,
|
2903
2905
|
span,
|
2904
|
-
tracerProvider: options.tracerProvider ?? this.tracerProvider
|
2906
|
+
tracerProvider: options.tracerProvider ?? this.tracerProvider,
|
2907
|
+
idempotencyStrategy: this.federation.idempotencyStrategy
|
2905
2908
|
});
|
2906
2909
|
return routeResult === "alreadyProcessed" || routeResult === "enqueued" || routeResult === "unsupportedActivity" || routeResult === "success";
|
2907
2910
|
}
|