Skip to content

Conversation pagination

Steven Fuchs requested to merge stwf/pleroma:conversation-pagination into develop

The recent addition of Pleroma.Web.ApiSpec.CastAndValidate has the side effect of changing all param keys to atoms from strings. This has the side effect of breaking Pleroma.Pagination. I see other controllers are re-stringifying their params after receiving them before they use Pagination (examples below). Stringifying all of the params broke the ConversationController though, so I'm just stringifying the pagination params and it seems to work.

A more elegant fix would be to fix Pleroma.Pagination and eliminate all of the stringifying but I'm not sure how deep that night go, seeing that it has been done elsewhere. For the record the offending call in Pleroma.Pagination is here:

https://git.pleroma.social/pleroma/pleroma/-/blob/develop/lib/pleroma/pagination.ex#L94

And examples of controllers stringifying are here: https://git.pleroma.social/pleroma/pleroma/-/blob/develop/lib/pleroma/web/mastodon_api/controllers/timeline_controller.ex#L47 https://git.pleroma.social/pleroma/pleroma/-/blob/develop/lib/pleroma/web/mastodon_api/controllers/timeline_controller.ex#L96 https://git.pleroma.social/pleroma/pleroma/-/blob/develop/lib/pleroma/web/mastodon_api/controllers/scheduled_activity_controller.ex#L27

Merge request reports