TelegramBotsExample icon indicating copy to clipboard operation
TelegramBotsExample copied to clipboard

How to treat chat session thread-safe like http session

Open lsianturi opened this issue 8 years ago • 2 comments

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.

lsianturi avatar Jun 08 '17 04:06 lsianturi

Maybe just store in DB?

formatq avatar Aug 13 '17 09:08 formatq

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

mhkarimi avatar May 08 '19 11:05 mhkarimi