TelegramBotsExample
TelegramBotsExample copied to clipboard
How to treat chat session thread-safe like http session
Hello, how to handle multiple chat users in different session, so for example if we create an object in the handler it will not mix across different users.
Maybe just store in DB?
Hello, how to handle multiple chat users in different session, so for example if we create an object in the handler it will not mix across different users.
You should user Concurrenthashmap and with each user's ID as a key