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

Fix skipping in thread pagination #2658

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

freya022
Copy link
Contributor

Pull Request Etiquette

Changes

  • Internal code
  • Library interface (affecting end-user code)
  • Documentation
  • Other: _____

Closes Issue: NaN

Description

Attempts to fix thread pagination when using skipTo, also stops archived threads from being cached, since I assume they would never get removed

return last.getTimeArchiveInfoLastModified().toString();
else if (lastId != 0)
// If the user skipped ahead
return TimeUtil.getTimeCreated(lastId).toString();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure if this should even be allowed, it's very easy for the user to try to skip using an ID, when in reality it uses the ID as a iso8601 timestamp, requiring to pass the thread archival timestamp, instead of the thread ID.

My use case was to retrieve a channel by ID by making a small window with the pagination, would be much better if JDA had a way to retrieve a channel by ID

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.

None yet

1 participant