Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid paginating forever in private rooms #124

Merged
merged 3 commits into from
Apr 8, 2016
Merged

Conversation

richvdh
Copy link
Member

@richvdh richvdh commented Apr 7, 2016

In TimelineWindow.paginate, keep a count of the number of API requests we have
made, and bail out if it gets too high, to ensure that we don't get stuck in a
loop of paginating right back to the start of the room.

In TimelineWindow.paginate, keep a count of the number of API requests we have
made, and bail out if it gets too high, to ensure that we don't get stuck in a
loop of paginating right back to the start of the room.
@richvdh
Copy link
Member Author

richvdh commented Apr 7, 2016

(this is waiting for the react-sdk PR)

@richvdh
Copy link
Member Author

richvdh commented Apr 8, 2016

This goes together with #124.

if (!makeRequest) {
if (!makeRequest || requestLimit === 0) {
// todo: should we return something different to indicate that there
// might be more envets out there, but we haven't found them yet?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment typo

@dbkr
Copy link
Member

dbkr commented Apr 8, 2016

otherwise lgtm

@dbkr dbkr assigned richvdh and unassigned dbkr Apr 8, 2016
s/evnets/events/
@richvdh
Copy link
Member Author

richvdh commented Apr 8, 2016

ta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants