Unverified Commit 013645ea authored by Hong Minhee's avatar Hong Minhee
Browse files

Fix id for collections with base-url param

parent 98e4478e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -12,6 +12,10 @@ To be released.
    objects returned by followers collection dispatcher had been an incorrect
    value if a `base-url` parameter was provided.

 -  Fixed a bug where the `id` property of `OrderedCollection` and
    `OrderedCollectionPage` objects returned by followers collection dispatcher
    had been an incorrect value if a `base-url` parameter was provided.


Version 1.0.21
--------------
+7 −1
Original line number Diff line number Diff line
@@ -1920,7 +1920,13 @@ export class FederationImpl<TContextData> implements Federation<TContextData> {
        return await handleCollection(request, {
          name: "followers",
          identifier: route.values.identifier ?? route.values.handle,
          uriGetter: context.getFollowersUri.bind(context),
          uriGetter: baseUrl == null
            ? context.getFollowersUri.bind(context)
            : (identifier) => {
              const uri = context.getFollowersUri(identifier);
              uri.searchParams.set("base-url", baseUrl!);
              return uri;
            },
          context,
          filter: baseUrl != null ? new URL(baseUrl) : undefined,
          filterPredicate: baseUrl != null