Reputation: 1363
I want to build a telegram bot for feed subscription, so the subscribers can get site update. But I need user to start chat with my bot. I'll using deep linking according to this url: https://core.telegram.org/bots#deep-linking (assuming there are 2 users)
Now there is a problem. When offset increased what about user #1 that starts chat with bot just before the user #2. If #1 clicks on check button after increasing offset by #2, the bot will not received the #1 message.
p.s. I don't want using ssl and webhook
Sorry for bad English.
Upvotes: 5
Views: 4537
Reputation: 4484
You are almost right in what you are trying to achieve. Two things:
So the steps become:
Now, whenever you want to send a message to $username, simply look up their chat_id in the database and send a message to that chatId (https://core.telegram.org/bots/api#sendmessage).
Upvotes: 4