- Telegram bot token in env
- Postgres database 'telegram'
- Specify web-client.base-url of your other backend server with auth controller
- Run kafka and enable telegram.kafka.enabled
- You should specify password, user and database in env. The same if you run in docker
Kafka is used to apply TelegramUserUpdates:
- If a user is new and saved the update has old user and a new one to be equal.
- If a user is old and bot noticed some changes in user info the update has old and new TelegramUser to be different in some attributes.
- Bot checks user changes (username, for example) periodically and before each external call (for example, /get_password, not implemented yet) to send only the relevant information about the user.
- On /get_password GetPasswordMessageProcessor does the following:
- Sends POST request to
/api/telegram/authof specified auth server. - Passes TelegramUser in body.
- Awaits for OK status and returns the password
- Otherwise, outputs negatively (can't register, for example)
- Sends POST request to