Renato Alves

Results 92 comments of Renato Alves
trafficstars

That's correct! And I see your point. I'll update that.

It appears that paginating messages from a thread is not part of BuddyPress core. I created this ticket https://buddypress.trac.wordpress.org/ticket/8508 to add this enhancement. After that's done, I'll apply it here.

@berzki Have you looked at the documentation? You can use the `messages_page` and `messages_per_page` to paginate messages of a large thread. https://developer.buddypress.org/bp-rest-api/reference/private-messaging/#list-messages-threads

@berzki That looks like a bug then. What's your BuddyPress version?

@berzki Confirmed. Apparently, I forgot to add support for pagination when getting a single thread, and its messages. Could you test [this pr](https://github.com/buddypress/BP-REST/pull/503) please?

@berzki Ops! Good catch. I totally forgot about the pagination headers. Added. Also, it's possible to sort the messages. Could you test the pull request again?

@berzki I think it does work as designed, maybe not as intended? **All messages** are sorted **before** they are split for pagination. https://github.com/buddypress/buddypress/blob/5a8f3eace1ab3db572cff6a7ed96e6f0807da239/src/bp-messages/classes/class-bp-messages-thread.php#L413-L422 If you have 1, 2, 3, 4,...

I have a few updates to the Messages component regarding pagination. It's possible we might be able to add this later, but not now.