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

Download a screenful of history instead of fixed 10 messages #130

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zouppen
Copy link
Contributor

@zouppen zouppen commented Nov 12, 2019

When opening the chat window for the first time, load as many messages as there are chat window rows.

This is not perfect because messages may span multiple lines and in
some cases less messages are returned than "limit". But it's better
guess than magic number of 10, though.

This is not perfect because messages may span multiple lines and in
some cases less messages are returned than "limit". But it's better
guess than magic number of 10, though.
uuid, request = self.client.room_messages(
room_id,
room_buffer.prev_batch,
limit=10)
Copy link
Owner

Choose a reason for hiding this comment

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

Right this should have been max_initial_sync_events instead. We should use this instead and make your way a configurable option. Pretty sure not everyone wants their chat window filled.

@user202729
Copy link
Contributor

Also, this will download (screen size) messages, including filtered ones; so if there are many filtered messages, the number of added messages might still be less than a screen (it can be zero too)

@K-L-R-3
Copy link

K-L-R-3 commented Sep 1, 2022

Is there a way to download all of the availible chat history? Or some arbitray larger amount of history?

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.

4 participants