antonio-antuan / rust-tdlib

Rust client for TDlib
MIT License
57 stars 11 forks source link

Question: How do you get messages as they come in? #13

Closed ibortnik closed 3 years ago

ibortnik commented 3 years ago

I wish to get new messages as they arrive in a chat. I see types:::UpdateNewMessage but no update_new_message() function..

What do I use UpdateNewMessage with?

antonio-antuan commented 3 years ago

You can get new messages with mpsc::channel if you pass sender to ClientBuilder::with_updates_sender. See this for more details.

ibortnik commented 3 years ago

Thanks!