Followers OrderedCollectionPage example

Hello.

Is there any example of what should be in this output?

While working on the project, I created a controller that looked something like this:

{
    "@context": "https://www.w3.org/ns/activitystreams",
    "type": "OrderedCollectionPage",
    "partOf": "https://cool.site/activitypub/users/adam/followers?offset=0",
    "id": "https://cool.site/activitypub/users/adam/followers",
    "actor": "https://cool.site/activitypub/users/adam",
    "next": "https://cool.site/activitypub/users/adam/followers?limit=25&offset=0",
    "orderedItems": [
        "https://mastodon.social/users/alice",
        "https://mastodon.social/users/bob",
        "https://mastodon.social/users/cindy"
    ],
    "totalItems": 3
}

But on the Mastodon instance, only the number of followers is displayed, but not a list.

When I click on the Followers tab, I get this error: This user has chosen not to make this information available

There are no errors in the server logs. Access to the link https://cool.site/activitypub/users/adam/followers is not denied.

Could this be an error in the “orderedItems” section of the output?

Thanks in advance.

first, a few (unrelated?) issues with your serialization:

  • reverse id and partOf – conceptually it’s weird that your page is adam/followers but it’s partOf adam/followers?offset=0; this should probably be reversed, so that the OrderedCollection is adam/followers and the first OrderedCollectionPage is adam/followers?offset=0.
  • maybe remove next – i don’t know if there are any items in the next page, but it looks like there might not be. i see only 3 items here but a limit of 25. similarly, is the totalItems: 3 for the whole collection or just this page? in any case if the next page is empty then you should omit the next link/property
  • remove actoractor is only valid on an Activity. for a normal Object you should be using attributedTo. but for a followers collection page, the server owns it, not the actor.

second, a question:

  • are those three accounts actually following you on mastodon.social’s side? did they send a Follow and did you send back an Accept? generally, you can’t just claim that anyone is following you; mastodon and other software will use its local followers list that it can verify for itself, not the remote followers list which cannot be verified.