When a new user begins using the bot, we need to save their chat session id. This will be saved in our database similar to how a typical application would save a username. All personal settings to this user will be associated to them via this chat session id as the "user". Saving this and noting their subscription will also allow us to push messages to the user in the future.
Possible Implementation
Input
Whenever a user begins using the bot via a text message or the /start command, the Telegram API will provide a chat session id in the incoming data.
User Story Link: https://trello.com/c/5SSO9XEX/6-start
Description and Context
When a new user begins using the bot, we need to save their chat session id. This will be saved in our database similar to how a typical application would save a username. All personal settings to this user will be associated to them via this chat session id as the "user". Saving this and noting their subscription will also allow us to push messages to the user in the future.
Possible Implementation
Input
Whenever a user begins using the bot via a text message or the /start command, the Telegram API will provide a chat session id in the incoming data.
Process
Docs for Read and Write to Google Cloud Datastore: https://cloud.google.com/nodejs/getting-started/using-cloud-datastore
Output
We want to save something like this in the datastore
Environment