Unverified Commit c9be02ae authored by Hong Minhee's avatar Hong Minhee
Browse files

Merge tag '1.1.19' into 1.2-maintenance

Fedify 1.1.19
parents 9d200c7e f029fc57
Loading
Loading
Loading
Loading
+36 −0
Original line number Diff line number Diff line
@@ -8,6 +8,14 @@ Version 1.2.19

To be released.

 -  Fixed a bug where the `totalItems` property of `OrderedCollection`
    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.2.18
--------------
@@ -350,6 +358,20 @@ Released on October 31, 2024.
[#118]: https://github.com/dahlia/fedify/issues/118


Version 1.1.19
--------------

Released on March 26, 2025.

 -  Fixed a bug where the `totalItems` property of `OrderedCollection`
    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.1.18
--------------

@@ -732,6 +754,20 @@ Released on October 20, 2024.
[#150]: https://github.com/dahlia/fedify/issues/150


Version 1.0.22
--------------

Released on March 26, 2025.

 -  Fixed a bug where the `totalItems` property of `OrderedCollection`
    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
--------------

+2 −2
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ export interface PageItems<TItem> {
/**
 * Calculates the [partial follower collection digest][1].
 *
 * [1]: https://codeberg.org/fediverse/fep/src/branch/main/fep/8fcf/fep-8fcf.md#partial-follower-collection-digest
 * [1]: https://w3id.org/fep/8fcf#partial-follower-collection-digest
 * @param uris The URIs to calculate the digest.  Duplicate URIs are ignored.
 * @returns The digest.
 */
@@ -40,7 +40,7 @@ export async function digest(
/**
 * Builds [`Collection-Synchronization`][1] header content.
 *
 * [1]: https://codeberg.org/fediverse/fep/src/branch/main/fep/8fcf/fep-8fcf.md#the-collection-synchronization-http-header
 * [1]: https://w3id.org/fep/8fcf#the-collection-synchronization-http-header
 *
 * @param collectionId The sender's followers collection URI.
 * @param actorIds The actor URIs to digest.
+5 −2
Original line number Diff line number Diff line
@@ -222,7 +222,9 @@ export async function handleCollection<
      context,
      identifier,
    );
    const totalItems = await collectionCallbacks.counter?.(context, identifier);
    const totalItems = filter == null
      ? await collectionCallbacks.counter?.(context, identifier)
      : undefined;
    if (firstCursor == null) {
      const page = await collectionCallbacks.dispatcher(
        context,
@@ -329,7 +331,8 @@ function filterCollectionItems<TItem extends Object | Link | Recipient | URL>(
        getLogger(["fedify", "federation", "collection"]).warn(
          `The ${collectionName} collection apparently does not implement ` +
            "filtering.  This may result in a large response payload.  " +
            "Please consider implementing filtering for the collection.",
            "Please consider implementing filtering for the collection.  " +
            "See also: https://fedify.dev/manual/collections#filtering-by-server",
        );
        logged = true;
      }
+16 −1
Original line number Diff line number Diff line
@@ -1953,7 +1953,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
@@ -2631,6 +2637,15 @@ export class ContextImpl<TContextData> implements Context<TContextData> {
      this,
      identifier,
    );
    if (cursor != null) {
      getLogger(["fedify", "federation", "outbox"]).warn(
        "Since the followers collection dispatcher returned null for no " +
          "cursor (i.e., one-shot dispatcher), the pagination is used to fetch " +
          '"followers".  However, it is recommended to implement the one-shot ' +
          "dispatcher for better performance.",
        { identifier },
      );
    }
    while (cursor != null) {
      const result = await this.federation.followersCallbacks.dispatcher(
        this,