-
Notifications
You must be signed in to change notification settings - Fork 49
Description
Hi, I'm writing Spring Boot server using tdlight. I want to implement the logic of simultaneous management of telegram clients.
For example, a user logs into my app, then logs into Telegram and uses it. At the same time, another user logs into the application and creates a Telegram client.
Now I have implemented separate threads of execution for each user in a spring boot, and in them I initialize the Telegram clients, but when the second user logs in, the first user receives the second user's Telegram client. In the next logs you can see that there is on tdlib thread for all created clients:
2024-07-05T12:12:20.932+03:00 ERROR 21192 --- [pool-3-thread-1] c.h.TEST.telegram.client.Telegram : Telegram constructor 2024-07-05T12:12:31.287+03:00 ERROR 21192 --- [pool-3-thread-1] c.h.TEST.telegram.client.Telegram : Telegram login 2024-07-05T12:12:31.315+03:00 INFO 21192 --- [pool-3-thread-1] it.tdlight.TelegramClient : Registered new client 1 2024-07-05T12:12:31.352+03:00 INFO 21192 --- [ TDLib thread] c.h.TEST.telegram.client.Telegram : Logged in Telegram 2024-07-05T12:12:31.745+03:00 ERROR 21192 --- [ TDLib thread] c.h.TEST.telegram.client.Telegram : Telegram on new message 2024-07-05T12:12:31.747+03:00 ERROR 21192 --- [ TDLib thread] c.h.TEST.telegram.client.Telegram : Telegram on new message
So, is there ability to implement logic i want, and if yes - how?