Lonami / grammers

(tele)gramme.rs - use Telegram's API from Rust
https://t.me/gramme_rs
Apache License 2.0
554 stars 113 forks source link

Refresh the messages manually #234

Closed NiiightmareXD closed 4 months ago

NiiightmareXD commented 6 months ago

Hello, I have been testing the latency of the messages by using the 'date' function. I have noticed that there is always a delay of approximately 3 seconds between the time I send the message and the time it appears. Is there any way to refresh the messages manually to eliminate this delay?

Lonami commented 6 months ago

I don't plan to implemented this myself any time soon but seeing how some channels now must be polled or you won't get updates, we'll likely need some sort of client.watch method, yes.

Probably doing something similar as how this method is used: https://github.com/Lonami/grammers/blob/6e13715cf3b6bb35a502fc441b1821dba7bd238a/lib/grammers-session/src/message_box/mod.rs#L806

NiiightmareXD commented 5 months ago

Can I implement this? 🤔

Lonami commented 5 months ago

You could. But I don't know how I want it to look. Some rough ideas:

Leaning towards the first version, but that might not be the best.

Lonami commented 4 months ago

Closing this for now. I'm still not sure how this should work, but happy to reopen if interest comes up again.