Fix legacy pagination for Subscribed feed (#4030)

This is the fix suggested in #4019

I've manually tested both legacy pagination (`page=2&limit=20`) as well as the new pagination (`cursor_next=XXXXXXX&limit=20`) using the same endpoint as #4019, and both methods appear to work as expected.
This commit is contained in:
Maxime Poulin 2023-10-11 10:53:18 -04:00 committed by GitHub
parent 291ff19718
commit 3a1be8c041
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -629,7 +629,7 @@ impl<'a> PostQuery<'a> {
},
};
let (limit, offset) = limit_and_offset(self.page, self.limit)?;
if offset != 0 {
if offset != 0 && self.page_after.is_some() {
return Err(Error::QueryBuilderError(
"legacy pagination cannot be combined with v2 pagination".into(),
));