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

Load backlog from Discord. #12

Open
flowbish opened this issue Jun 23, 2016 · 5 comments
Open

Load backlog from Discord. #12

flowbish opened this issue Jun 23, 2016 · 5 comments

Comments

@flowbish
Copy link
Contributor

On startup pull backlog from the server and disregard the log on disk.

@calzoneman
Copy link

Looks like this was commented out in 8800f81. Are there plans to support it again in the future?

@khyperia
Copy link
Owner

Yeah... might have to do significant refactoring, though. See here :(

@khyperia khyperia reopened this Aug 16, 2017
@calzoneman
Copy link

I see; that's unfortunate. I'll follow that issue as well. If I knew Rust at all I'd offer to help out.

@Aanok
Copy link

Aanok commented Aug 16, 2017

I've actually been tinkering with this; at the moment I have some code that pulls on init the last N messages from each channel and prints them to the corresponding buffer with the correct timestamp. Further steps are mostly getting the last read message from each channel in order to pull the logs from there onward (it should be listed in the initial ReadyEvent, I think) and then moving everything to a separate thread. An option to toggle this behavior would also probably be in order.

Then it would be reasonable to implement issue #9 to have a complete synchronization mechanism, but that's going to be an adventure. To be honest it's already been an adventure, since I've just picked up Rust with this :p

@Aanok
Copy link

Aanok commented Aug 17, 2017

Rather, more than using a thread to load everything asynchronously at startup (which was my understanding of what you meant on the other thread, @khyperia ), it might be nice to load the backlog only when the corresponding buffer is actually accessed in WC by the user. It would cause a lag spike at that moment, sure, but it should be tolerable and would avoid issues of interleaving with new messages arriving while the backlogs are being pulled and printed.

Of course this requires more FFI wrappers to catch the corresponding WC signal, but that's also imho the biggest obstacle with issue #9 so it's something that needs to be done sooner or later.
(assuming we want to solve issue #9 by only acknowledging messages seen by the user, of course. The lazy solution is clearly to just ACK everything)

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

No branches or pull requests

4 participants