dahlia / fedify

ActivityPub server framework in TypeScript
https://fedify.dev/
MIT License
327 stars 13 forks source link

Add totalItems property to Collection objects #31

Closed jfietkau closed 3 months ago

jfietkau commented 3 months ago

The totalItems property contains an integer expressing the total number of items in the collection, specified in ActivityPub here. In my brief tests returning an array of URLs from an OutboxDispatcher, Fedify 0.5.0 did not add this property to the OrderedCollection object. Per the spec, it is applicable to all Collections.

In terms of interoperability, adding this property would allow Mastodon and other platforms to display the total number of posts by an Actor, assuming the outbox is populated with an OrderedCollection.

jfietkau commented 3 months ago

Congrats on the release of 0.5.0! If you don't mind, I'm going to keep leaving my feature requests here as I run into problems, but none of my stuff is particularly urgent. 🙂

jfietkau commented 3 months ago

Ah nevermind, I found out from studying the blog example how I can achieve this using setCounter.